From 34b997c4d6a41fa6cc3587d4dfa8ec4b60a65ad1 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sun, 26 May 2013 10:20:09 -0700 Subject: [PATCH] Not adding -Werror and friends for Xcode --- cpp/ycm/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/ycm/CMakeLists.txt b/cpp/ycm/CMakeLists.txt index 29752008..cebcbf3f 100644 --- a/cpp/ycm/CMakeLists.txt +++ b/cpp/ycm/CMakeLists.txt @@ -281,7 +281,11 @@ set_target_properties( ${PROJECT_NAME} PROPERTIES ############################################################################# -if( CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG ) + +# For some reason, Xcode is too dumb to understand the -isystem flag and thus +# borks on warnings in Boost. +if ( ( CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG ) AND + NOT CMAKE_GENERATOR_IS_XCODE ) # We want all warnings, and warnings should be treated as errors set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror" ) endif()