Skip to content
This repository has been archived by the owner on Jul 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #4 from theopolis/faster_benchmark
Browse files Browse the repository at this point in the history
Silence google benchmark CMake output
  • Loading branch information
Teddy Reed committed Jul 24, 2015
2 parents 5f15018 + e57e199 commit 9d40527
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
7 changes: 4 additions & 3 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ option(BENCHMARK_ENABLE_LTO "Enable link time optimisation of the benchmark libr
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# Read the git tags to determine the project version
include(GetGitVersion)
get_git_version(GIT_VERSION)
#include(GetGitVersion)
#get_git_version(GIT_VERSION)

# Tell the user what versions we are using
set(GIT_VERSION "v0.0.0")
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION ${GIT_VERSION})
message("-- Version: ${VERSION}")
#message("-- Version: ${VERSION}")

# The version of the libraries
set(GENERIC_LIB_VERSION ${VERSION})
Expand Down
14 changes: 7 additions & 7 deletions benchmark/cmake/CXXFeatureCheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ function(cxx_feature_check FILE)
string(TOLOWER ${FILE} FILE)
string(TOUPPER ${FILE} VAR)
string(TOUPPER "HAVE_${VAR}" FEATURE)
message("-- Performing Test ${FEATURE}")
#message("-- Performing Test ${FEATURE}")
try_run(RUN_${FEATURE} COMPILE_${FEATURE}
${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${FILE}.cpp)
if(RUN_${FEATURE} EQUAL 0)
message("-- Performing Test ${FEATURE} -- success")
#message("-- Performing Test ${FEATURE} -- success")
set(HAVE_${VAR} 1 PARENT_SCOPE)
add_definitions(-DHAVE_${VAR})
else()
if(NOT COMPILE_${FEATURE})
message("-- Performing Test ${FEATURE} -- failed to compile")
else()
message("-- Performing Test ${FEATURE} -- compiled but failed to run")
endif()
#if(NOT COMPILE_${FEATURE})
#message("-- Performing Test ${FEATURE} -- failed to compile")
#else()
#message("-- Performing Test ${FEATURE} -- compiled but failed to run")
#endif()
endif()
endfunction()

0 comments on commit 9d40527

Please sign in to comment.