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:
Richard Smith 2014-09-26 21:35:48 +00:00
parent 571b0b9ede
commit ca9ae10c1a
1 changed files with 1 additions and 1 deletions

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)