summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-14 10:13:18 +0000
committerCampbell Barton <ideasman42@gmail.com>2011-06-14 10:13:18 +0000
commiteb4f54557015dba90f59d573733ba7105fe52063 (patch)
tree22e5def2c7b5a40ef6427a529b5b76a9b347779e
parentcmake: update ignore list. (diff)
downloadinkscape-eb4f54557015dba90f59d573733ba7105fe52063.tar.gz
inkscape-eb4f54557015dba90f59d573733ba7105fe52063.zip
cmake: use system includes (-isystem in gcc).
(bzr r10300)
-rw-r--r--CMakeLists.txt11
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake2
2 files changed, 10 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 82b5e50b2..148d46691 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,8 +13,15 @@ cmake_minimum_required(VERSION 2.8.0)
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
if(COMMAND cmake_policy)
- cmake_policy(SET CMP0003 NEW)
- cmake_policy(SET CMP0005 NEW) # propper define quoting
+ cmake_policy(SET CMP0003 NEW)
+ cmake_policy(SET CMP0005 NEW) # propper define quoting
+endif()
+
+# workaround for omission in cmake 2.8.4's GNU.cmake, fixed in 2.8.5
+if(CMAKE_COMPILER_IS_GNUCC)
+ if(NOT DARWIN)
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
+ endif()
endif()
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeScripts")
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index 0797362d3..c374eec0e 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -137,7 +137,7 @@ include(IncludeJava)
# message(FATAL_ERROR "Whee: ${INKSCAPE_LINK_DIRS}")
# C/C++ Flags
-include_directories(${INKSCAPE_INCS})
+include_directories(SYSTEM ${INKSCAPE_INCS})
unset(INKSCAPE_INCS)
include(ConfigChecks)