llvm.org GIT mirror llvm / b9aefe6
[CMake] Put -Werror to CMAKE_CXX_FLAGS instead of using add_llvm_definitions() add_definitions shouldn't really be used for compiler flags, and the variable LLVM_DEFINITIONS is not appropriately used at the moment, e.g. it's not exported to LLVMConfig.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203792 91177308-0d34-0410-b5e6-96231b3b80d8 Alexey Samsonov 6 years ago
1 changed file(s) with 1 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
306306 check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG)
307307 append_if(CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG "-Wnon-virtual-dtor" CMAKE_CXX_FLAGS)
308308 endif (LLVM_ENABLE_WARNINGS)
309 if (LLVM_ENABLE_WERROR)
310 add_llvm_definitions( -Werror )
311 endif (LLVM_ENABLE_WERROR)
309 append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
312310 if (LLVM_ENABLE_CXX1Y)
313311 check_cxx_compiler_flag("-std=c++1y" CXX_SUPPORTS_CXX1Y)
314312 append_if(CXX_SUPPORTS_CXX1Y "-std=c++1y" CMAKE_CXX_FLAGS)