Skip to content

Commit

Permalink
Avoid using CMake 3.6 feature list(FILTER ...) (#612)
Browse files Browse the repository at this point in the history
list(FILTER ...) is a CMake 3.6 feature, but benchmark targets CMake 2.8.12
  • Loading branch information
Maratyszcza authored and dominichamon committed Jun 6, 2018
1 parent 1301f53 commit 505be96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ file(GLOB
*.cc
${PROJECT_SOURCE_DIR}/include/benchmark/*.h
${CMAKE_CURRENT_SOURCE_DIR}/*.h)
list(FILTER SOURCE_FILES EXCLUDE REGEX "benchmark_main\\.cc")
file(GLOB BENCHMARK_MAIN "benchmark_main.cc")
foreach(item ${BENCHMARK_MAIN})
list(REMOVE_ITEM SOURCE_FILES "${item}")
endforeach()

add_library(benchmark ${SOURCE_FILES})
set_target_properties(benchmark PROPERTIES
Expand Down

0 comments on commit 505be96

Please sign in to comment.