summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-20 09:34:04 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-20 09:34:04 (GMT)
commitb8506b6443e5aa478ac065a6ed35dd6a74c4a715 (patch)
tree64a369aaaaf904e3de7be66529a274841fde8463
parent25f5e770835d9d075ad57814366a40fcca983f75 (diff)
parent178cda6230647b9f585ee6aecbbf3f0198dbf229 (diff)
downloadlibkolabxml-b8506b6443e5aa478ac065a6ed35dd6a74c4a715.tar.gz
Merge branch 'master' of ssh://git.kolabsys.com/git/libkolabxml
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 892bf72..406a4d8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,6 +97,16 @@ endif(SWIG)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
+execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
+ OUTPUT_VARIABLE GCC_VERSION)
+if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
+ message(STATUS "Version >= 4.7")
+ # gcc 4.7 no longer performs unqualified lookups by default, see: http://gcc.gnu.org/gcc-4.7/porting_to.html.
+ # This workaround is added for xsd code, which fails otherwise to compile. -fpermissive turns the errors into warnings.
+ # It's only temporary, and should be removed once xsd is fixed.
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive" )
+endif()
+
# set( CMAKE_VERBOSE_MAKEFILE on )
set(CMAKE_BUILD_TYPE Debug)