Attempting to resolve a submoduling issues... (#439)

This commit is contained in:
Roman Lebedev 2017-08-29 02:10:19 +03:00 committed by Dominic Hamon
parent a271c36af9
commit 6e06648133
3 changed files with 13 additions and 16 deletions

View File

@ -135,24 +135,21 @@ else()
endif() endif()
# Coverage build type # Coverage build type
set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING set(BENCHMARK_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG}"
"Flags used by the C++ compiler during coverage builds." CACHE STRING "Flags used by the C++ compiler during coverage builds."
FORCE) FORCE)
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE set(BENCHMARK_EXE_LINKER_FLAGS_COVERAGE "${CMAKE_EXE_LINKER_FLAGS_DEBUG}"
"${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING CACHE STRING "Flags used for linking binaries during coverage builds."
"Flags used for linking binaries during coverage builds."
FORCE) FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE set(BENCHMARK_SHARED_LINKER_FLAGS_COVERAGE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}"
"${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING CACHE STRING "Flags used by the shared libraries linker during coverage builds."
"Flags used by the shared libraries linker during coverage builds."
FORCE) FORCE)
mark_as_advanced( mark_as_advanced(
CMAKE_CXX_FLAGS_COVERAGE BENCHMARK_CXX_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE BENCHMARK_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE) BENCHMARK_SHARED_LINKER_FLAGS_COVERAGE)
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage." "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage.")
FORCE)
add_cxx_compiler_flag(--coverage COVERAGE) add_cxx_compiler_flag(--coverage COVERAGE)
endif() endif()

View File

@ -38,7 +38,7 @@ function(add_cxx_compiler_flag FLAG)
if(ARGV1) if(ARGV1)
string(TOUPPER "_${VARIANT}" VARIANT) string(TOUPPER "_${VARIANT}" VARIANT)
endif() endif()
set(CMAKE_CXX_FLAGS${VARIANT} "${CMAKE_CXX_FLAGS${VARIANT}} ${FLAG}" PARENT_SCOPE) set(CMAKE_CXX_FLAGS${VARIANT} "${CMAKE_CXX_FLAGS${VARIANT}} ${BENCHMARK_CXX_FLAGS${VARIANT}} ${FLAG}" PARENT_SCOPE)
endif() endif()
endfunction() endfunction()

View File

@ -22,7 +22,7 @@ function(cxx_feature_check FILE)
string(TOUPPER ${FILE} VAR) string(TOUPPER ${FILE} VAR)
string(TOUPPER "HAVE_${VAR}" FEATURE) string(TOUPPER "HAVE_${VAR}" FEATURE)
if (DEFINED HAVE_${VAR}) if (DEFINED HAVE_${VAR})
set(HAVE_${VAR} 1 CACHE INTERNAL "Feature test for ${FILE}" PARENT_SCOPE) set(HAVE_${VAR} 1 PARENT_SCOPE)
add_definitions(-DHAVE_${VAR}) add_definitions(-DHAVE_${VAR})
return() return()
endif() endif()
@ -50,7 +50,7 @@ function(cxx_feature_check FILE)
if(RUN_${FEATURE} EQUAL 0) if(RUN_${FEATURE} EQUAL 0)
message("-- Performing Test ${FEATURE} -- success") message("-- Performing Test ${FEATURE} -- success")
set(HAVE_${VAR} 1 CACHE INTERNAL "Feature test for ${FILE}" PARENT_SCOPE) set(HAVE_${VAR} 1 PARENT_SCOPE)
add_definitions(-DHAVE_${VAR}) add_definitions(-DHAVE_${VAR})
else() else()
if(NOT COMPILE_${FEATURE}) if(NOT COMPILE_${FEATURE})