File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -460,7 +460,9 @@ add_subdirectory(unittest)
460460add_subdirectory (examples )
461461
462462# --- BENCHMARKS ---------------------------------------------------------------
463- add_subdirectory (benchmark )
463+ if (BUILD_BENCHMARK)
464+ add_subdirectory (benchmark )
465+ endif ()
464466
465467# --- PACKAGING ----------------------------------------------------------------
466468macro (EXPORT_VARIABLE var_name var_value )
Original file line number Diff line number Diff line change 66# --- BENCHMARK --------------------------------------
77# ----------------------------------------------------
88add_custom_target (bench )
9+
910add_project_private_dependency (benchmark REQUIRED )
1011
1112macro (ADD_PINOCCHIO_BENCH bench_name )
@@ -14,11 +15,7 @@ macro(ADD_PINOCCHIO_BENCH bench_name)
1415 set (multiValueArgs PACKAGES)
1516 cmake_parse_arguments (unit_test "${options} " "${oneValueArgs} " "${multiValueArgs} " ${ARGN} )
1617
17- if (BUILD_BENCHMARK)
18- add_executable (${bench_name} ${bench_name} .cpp )
19- else ()
20- add_executable (${bench_name} EXCLUDE_FROM_ALL ${bench_name} .cpp )
21- endif ()
18+ add_executable (${bench_name} ${bench_name} .cpp )
2219
2320 target_compile_definitions (${bench_name} PRIVATE PINOCCHIO_MODEL_DIR= "${PINOCCHIO_MODEL_DIR} " )
2421 if (NOT unit_test_HEADER_ONLY)
You can’t perform that action at this time.
0 commit comments