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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218543 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Smith 2014-09-26 21:35:48 +00:00
parent dadfd4f0a7
commit 7e0a0e282a

View File

@ -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)