Skip to content

Commit 6d413c4

Browse files
committed
pixi: Add some ccache configuration
1 parent 1c92137 commit 6d413c4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

development/scripts/pixi/activation.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ then
2020
# On GNU/Linux, I don't know if these flags are mandatory with g++ but
2121
# it allow to use clang++ as compiler
2222
export LDFLAGS="-Wl,-rpath,$CONDA_PREFIX/lib -Wl,-rpath-link,$CONDA_PREFIX/lib -L$CONDA_PREFIX/lib"
23+
# Conda compiler is named x86_64-conda-linux-gnu-c++, ccache can't resolve it
24+
# (https://ccache.dev/manual/latest.html#config_compiler_type)
25+
export CCACHE_COMPILERTYPE=gcc
2326
fi
2427
# Without -isystem, some LSP can't find headers
2528
export EIGENPY_CXX_FLAGS="$CXXFLAGS -isystem $CONDA_PREFIX/include"

pixi.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ CMAKE_CXX_COMPILER_LAUNCHER = "ccache"
6363
CMAKE_EXPORT_COMPILE_COMMANDS = "ON"
6464
# Activate color output with Ninja
6565
CMAKE_COLOR_DIAGNOSTICS = "ON"
66+
# Help ccache manage generated files and PCH (https://ccache.dev/manual/latest.html#_precompiled_headers)
67+
CCACHE_SLOPPINESS = "include_file_ctime,include_file_mtime,pch_defines,time_macros"
6668

6769
[tasks]
6870
# We must avoid to set CMAKE_CXX_FLAGS because of WIN32

0 commit comments

Comments
 (0)