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