From f9b6e7eeef7b8f4194661085e04b68b9f2e0bf11 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 7 Jun 2012 22:26:00 +0000 Subject: [PATCH] Fix warning flags for CMake builds, from Andrew C. Morrow! git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@158172 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7429f67..00ea4851 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,17 +87,17 @@ macro(append_if list condition var) endmacro() # Get warning flags -append_if(LIBCXX_WARNING_FLAGS LIBCXX_HAS_WALL_FLAG -Wall) -append_if(LIBCXX_WARNING_FLAGS LIBCXX_HAS_W_FLAG -W) -append_if(LIBCXX_WARNING_FLAGS LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG -Wno-unused-parameter) -append_if(LIBCXX_WARNING_FLAGS LIBCXX_HAS_WWRITE_STRINGS_FLAG -Wwrite-strings) -append_if(LIBCXX_WARNING_FLAGS LIBCXX_HAS_WNO_LONG_LONG_FLAG -Wno-long-long) +append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WALL_FLAG -Wall) +append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_W_FLAG -W) +append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG -Wno-unused-parameter) +append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WWRITE_STRINGS_FLAG -Wwrite-strings) +append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WNO_LONG_LONG_FLAG -Wno-long-long) if (LIBCXX_ENABLE_WERROR) - append_if(LIBCXX_WARNING_FLAGS LIBCXX_HAS_WERROR_FLAG -Werror) - append_if(LIBCXX_WARNING_FLAGS LIBCXX_HAS_WX_FLAG -WX) + append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WERROR_FLAG -Werror) + append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WX_FLAG -WX) endif() if (LIBCXX_ENABLE_PEDANTIC) - append_if(LIBCXX_WARNING_FLAGS LIBCXX_HAS_PEDANTIC_FLAG -pedantic) + append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_PEDANTIC_FLAG -pedantic) endif() # Get feature flags.