From e55c2a81f1289930552f66674a976af77588a1d2 Mon Sep 17 00:00:00 2001 From: Daniel Sipka Date: Fri, 2 Oct 2015 17:19:48 +0200 Subject: [PATCH] separate benchmark target --- CMakeLists.txt | 11 ++++++++--- benchmark/CMakeLists.txt | 2 ++ {test => benchmark}/benchmark_main.cpp | 0 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 benchmark/CMakeLists.txt rename {test => benchmark}/benchmark_main.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3f9b43..35b8740 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,8 +18,13 @@ if(WITH_UNIT_TESTS) enable_testing() include_directories( vendor/Catch/single_include - vendor/json.hpp/include - vendor/benchmark/include) - add_subdirectory(vendor/benchmark) + vendor/json.hpp/include) add_subdirectory(test) endif() + +if(WITH_BENCHMARK) + include_directories( + vendor/benchmark/include) + add_subdirectory(vendor/benchmark) + add_subdirectory(benchmark) +endif() diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt new file mode 100644 index 0000000..3797c73 --- /dev/null +++ b/benchmark/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(mstch_benchmark benchmark_main.cpp) +target_link_libraries(mstch_benchmark mstch benchmark) diff --git a/test/benchmark_main.cpp b/benchmark/benchmark_main.cpp similarity index 100% rename from test/benchmark_main.cpp rename to benchmark/benchmark_main.cpp