mirror of https://github.com/google/benchmark.git
Cache RUN_${FEATURE} variable in CXXFeatureCheck.cmake (#886)
When cross-compiling, this variable was not set on the second run of CMake, resulting in the next check failing even though it shouldn't be run in the first place. Fix this by caching the variable.
This commit is contained in:
parent
b8bce0c7ed
commit
f4f5dba46b
|
@ -37,9 +37,9 @@ function(cxx_feature_check FILE)
|
|||
if(COMPILE_${FEATURE})
|
||||
message(WARNING
|
||||
"If you see build failures due to cross compilation, try setting HAVE_${VAR} to 0")
|
||||
set(RUN_${FEATURE} 0)
|
||||
set(RUN_${FEATURE} 0 CACHE INTERNAL "")
|
||||
else()
|
||||
set(RUN_${FEATURE} 1)
|
||||
set(RUN_${FEATURE} 1 CACHE INTERNAL "")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Performing Test ${FEATURE}")
|
||||
|
|
Loading…
Reference in New Issue