Skip to content

Commit 5a3035b

Browse files
committed
Propagate some CMake variables to checkperf
Although it passes user-defined options, if the project is build in Debug mode or with Clang (since CXX defaults to gcc on Linux) results can flactuate
1 parent fa4ce6a commit 5a3035b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

benchmark/checkperf.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ if (Git_FOUND)
5858
# - second, cmake ..
5959
add_custom_command(
6060
OUTPUT ${SIMDJSON_CHECKPERF_DIR}/build/cmake_install.cmake # We make many things but this seems the most cross-platform one we can depend on
61-
COMMAND ${CMAKE_COMMAND} -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_COMPETITION=OFF -G ${CMAKE_GENERATOR} ..
61+
COMMAND
62+
${CMAKE_COMMAND} -E env CXX=${CMAKE_CXX_COMPILER} CC=${CMAKE_C_COMPILER}
63+
${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_COMPETITION=OFF -G ${CMAKE_GENERATOR} ..
6264
WORKING_DIRECTORY ${SIMDJSON_CHECKPERF_DIR}/build
6365
DEPENDS ${SIMDJSON_CHECKPERF_DIR}/build/CMakeCache.txt
6466
)

0 commit comments

Comments
 (0)