Pass flag string to `check_cxx_compiler_flag` (#298)

This commit is contained in:
ktnyt 2016-10-06 01:19:14 +09:00 committed by Dominic Hamon
parent 2aca242bf6
commit d1daeee4e9
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ function(add_cxx_compiler_flag FLAG)
string(REGEX REPLACE "[^A-Za-z_0-9]" "_" SANITIZED_FLAG ${SANITIZED_FLAG})
string(REGEX REPLACE "_+" "_" SANITIZED_FLAG ${SANITIZED_FLAG})
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
check_cxx_compiler_flag("" ${SANITIZED_FLAG})
check_cxx_compiler_flag("${FLAG}" ${SANITIZED_FLAG})
if(${SANITIZED_FLAG})
set(VARIANT ${ARGV1})
if(ARGV1)