diff CMakeLists.txt @ 1266:a548dd9a5dbe

Fix c++ build with CLANG The c++ include directories were not picked up automatically and had to be added manually.
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 26 Sep 2014 18:44:41 +0200
parents 3cd8dd706aaa
children 05d4b2b8f22a
line wrap: on
line diff
--- a/CMakeLists.txt	Fri Sep 26 18:01:35 2014 +0200
+++ b/CMakeLists.txt	Fri Sep 26 18:44:41 2014 +0200
@@ -24,6 +24,8 @@
 
 if (USE_CLANG)
    message (STATUS "Using clang options to build trustbridge.")
+   # This is a bit of a hack but necessary on Ubuntu 14.4
+   include_directories(/usr/include/c++/4.8 /usr/include/x86_64-linux-gnu/c++/4.8/)
 endif()
 
 include(CTest)
@@ -138,8 +140,10 @@
 endif()
 
 # No chance to compile nss with -Werror
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+if (NOT USE_CLANG)
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+endif()
 
 # Cmake does not correctly identify gcc windres when cross compiling
 # making this line neccessary to set the correct flags for it.

http://wald.intevation.org/projects/trustbridge/