We won't build the benchmarks by default anymore.

This commit is contained in:
Daniel Lemire 2020-09-28 10:24:51 -04:00
parent 82355cf1bc
commit ecfabe7b49
2 changed files with 11 additions and 8 deletions

View file

@ -29,6 +29,7 @@ target_include_directories(unit PUBLIC include)
enable_testing()
add_test(unit unit)
option(FAST_DOUBLE_BENCHMARKS "Sanitize addresses" OFF)
@ -45,14 +46,16 @@ function(initialize_submodule DIRECTORY)
endif()
endfunction(initialize_submodule)
initialize_submodule(benchmarks/dependencies/abseil-cpp)
initialize_submodule(benchmarks/dependencies/double-conversion)
if(FAST_DOUBLE_BENCHMARKS)
initialize_submodule(benchmarks/dependencies/abseil-cpp)
initialize_submodule(benchmarks/dependencies/double-conversion)
add_subdirectory(benchmarks/dependencies/abseil-cpp)
add_subdirectory(benchmarks/dependencies/double-conversion)
add_subdirectory(benchmarks/dependencies/abseil-cpp)
add_subdirectory(benchmarks/dependencies/double-conversion)
add_executable(benchmark ${benchmark_src})
target_link_libraries(benchmark PUBLIC double-conversion absl_strings)
target_include_directories(benchmark PUBLIC include)
add_executable(benchmark ${benchmark_src})
target_link_libraries(benchmark PUBLIC double-conversion absl_strings)
target_include_directories(benchmark PUBLIC include)
endif(FAST_DOUBLE_BENCHMARKS)

View file

@ -48,7 +48,7 @@ git clone https://github.com/lemire/fast_double_parser.git
cd fast_double_parser
mkdir build
cd build
cmake ..
cmake .. -DFAST_DOUBLE_BENCHMARKS=ON
cmake --build . --config Release
ctest .
./benchmark