Hi Bigcheese, chandlerc, When building with GCC with extended warning flags, unknown pragmas (erroneously) trigger warnings. Pass -Wno-unknown-pragmas to avoid this warning. Technically, the compiler should discard any pragmas it does not explicitly support, so, this warning is not adding much and should be safe to disable.
http://llvm-reviews.chandlerc.com/D240 Files: CMakeLists.txt Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -152,6 +152,9 @@ if (LIBCXX_ENABLE_PEDANTIC) append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_PEDANTIC_FLAG -pedantic) endif() +if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX) + list(APPEND LIBCXX_CXX_WARNING_FLAGS -Wno-unknown-pragmas) +endif () # Get feature flags. # Exceptions
Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -152,6 +152,9 @@ if (LIBCXX_ENABLE_PEDANTIC) append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_PEDANTIC_FLAG -pedantic) endif() +if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX) + list(APPEND LIBCXX_CXX_WARNING_FLAGS -Wno-unknown-pragmas) +endif () # Get feature flags. # Exceptions
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
