forked from OSchip/llvm-project
Fix CMake warning CMP0054: don't quote a variable name that is intended to be
expanded; future versions of cmake may not expand the variable in this case. llvm-svn: 218543
This commit is contained in:
parent
571b0b9ede
commit
ca9ae10c1a
|
@ -128,7 +128,7 @@ endmacro()
|
|||
function(add_flag_or_print_warning flag name)
|
||||
check_c_compiler_flag("-Werror ${flag}" "C_SUPPORTS_${name}")
|
||||
check_cxx_compiler_flag("-Werror ${flag}" "CXX_SUPPORTS_${name}")
|
||||
if ("C_SUPPORTS_${name}" AND "CXX_SUPPORTS_${name}")
|
||||
if (C_SUPPORTS_${name} AND CXX_SUPPORTS_${name})
|
||||
message(STATUS "Building with ${flag}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE)
|
||||
|
|
Loading…
Reference in New Issue