Skip to content

Commit ec5f853

Browse files
committed
cmake: Ask clang to not add pch-timestamp
1 parent 5b10839 commit ec5f853

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bindings/python/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@ function(PINOCCHIO_PYTHON_BINDINGS_SPECIFIC_TYPE scalar_name)
6161
# * -Wconversion as the BOOST_PYTHON_FUNCTION_OVERLOADS implicitly converts.
6262
# * -Wcomment as latex equations have multi-line comments.
6363
# * -Wself-assign-overloaded as bp::self operations trigger this (Clang only).
64+
# * -Xclang=-fno-pch-timestamp to allow ccache to use pch
65+
# (https://ccache.dev/manual/latest.html#_precompiled_headers).
6466
cxx_flags_by_compiler_frontend(
65-
GNU -Wno-conversion -Wno-comment -Wno-self-assign-overloaded
67+
GNU -Wno-conversion -Wno-comment -Wno-self-assign-overloaded -Xclang=-fno-pch-timestamp
68+
MSVC -Xclang=-fno-pch-timestamp
6669
OUTPUT PRIVATE_OPTIONS
6770
FILTER)
6871
target_compile_options(${PYTHON_LIB_NAME} PRIVATE ${PRIVATE_OPTIONS})

0 commit comments

Comments
 (0)