File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ if (NOT benchmark_FOUND)
1212 GIT_REPOSITORY https://github.com/google/benchmark.git
1313 GIT_TAG v${BENCHMARK_VERSION}
1414 )
15+ set (BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE )
1516 FetchContent_MakeAvailable (benchmark)
1617 else ()
1718 MESSAGE (FATAL_ERROR "Google::benchmark ${BENCHMARK_VERSION} not found" )
Original file line number Diff line number Diff line change @@ -20,10 +20,15 @@ if (NOT GTest_FOUND)
2020 endif ()
2121endif ()
2222
23- file (GLOB_RECURSE UNIT_TESTS_FILES LIST_DIRECTORIES false ${CMAKE_SOURCE_DIR } /tests/unit/*.cpp )
23+ file (GLOB_RECURSE UNIT_TESTS_FILES LIST_DIRECTORIES false
24+ ${CMAKE_SOURCE_DIR } /tests/unit/*.cpp
25+ )
2426add_executable (${PROJECT_NAME } ${UNIT_TESTS_FILES} )
2527
26- target_include_directories (${PROJECT_NAME } PUBLIC ${CMAKE_SOURCE_DIR } ${CMAKE_SOURCE_DIR } /tests/lib )
28+ target_include_directories (${PROJECT_NAME } PUBLIC
29+ ${CMAKE_SOURCE_DIR }
30+ ${CMAKE_SOURCE_DIR } /tests/lib
31+ )
2732target_link_libraries (${PROJECT_NAME } ${PROJECT_EULER_LIBRARY} )
2833if (GTest_FOUND)
2934 target_link_libraries (${PROJECT_NAME } GTest::Main )
You can’t perform that action at this time.
0 commit comments