Commit b68ff2ad authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[FIX #230] Now libeigen and boost should not clutter compilation output when compiled with clang

parent 98d7b8b7
......@@ -257,6 +257,9 @@ FUNCTION( BUILD_SYSTEM_COMPILER )
# MESSAGE( STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}" )
# MESSAGE( STATUS "CMAKE_C_FLAGS = ${CMAKE_C_FLAGS}" )
# Supress compilation warnings from includes residing in system paths, see #230 for further details.
SET( CMAKE_INCLUDE_SYSTEM_FLAG_CXX "isystem" )
ENDFUNCTION( BUILD_SYSTEM_COMPILER )
# GCC 4.7 requires us to explicitly link against libstdc++ and libm. CMake offers a variable for this called "CMAKE_STANDARD_LIBRARIES".
......@@ -315,7 +318,7 @@ ELSE()
ENDIF() #BUILD_SCRIPTENGINE
# include the boost headers
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( SYSTEM ${Boost_INCLUDE_DIR} )
# avoid filesystem 2 stuff
ADD_DEFINITIONS( "-DBOOST_FILESYSTEM_VERSION=3" )
......@@ -346,7 +349,7 @@ ENDIF()
SET( MIN_OSG_VERSION 2.8.0 )
FIND_PACKAGE( OpenSceneGraph ${MIN_OSG_VERSION} REQUIRED osgWidget osgViewer osgText osgSim osgGA osgDB osgUtil )
IF( OPENSCENEGRAPH_FOUND )
INCLUDE_DIRECTORIES( ${OPENSCENEGRAPH_INCLUDE_DIRS} )
INCLUDE_DIRECTORIES( SYSTEM ${OPENSCENEGRAPH_INCLUDE_DIRS} )
# is the OSG linked statically? If yes, we need to take care that all the osgdb plugins are linked too.
STRING( REGEX MATCH "osgDB\\.a" OPENSCENEGRAPH_STATIC "${OPENSCENEGRAPH_LIBRARIES}" )
......@@ -409,7 +412,7 @@ MARK_AS_ADVANCED( FORCE OPENTHREADS_LIBRARY_DEBUG )
FIND_PACKAGE( eigen3 REQUIRED )
IF( EIGEN3_FOUND )
INCLUDE_DIRECTORIES( ${EIGEN3_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( SYSTEM ${EIGEN3_INCLUDE_DIR} )
# NOTE: this is included in ext. But we need to set several definitions to make this work on 32 Bit machines due to alignment problems
SET( EIGEN3_DEFINES -DEIGEN_DONT_VECTORIZE -DEIGEN_DONT_ALIGN -DEIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT )
......@@ -431,8 +434,8 @@ FIND_PACKAGE( CxxTest QUIET )
IF( CXXTEST_FOUND )
# To enable testing
OPTION( OW_USE_TESTS "This enables compilation of tests" ON )
INCLUDE_DIRECTORIES( ${CXXTEST_INCLUDE_DIRS} )
INCLUDE_DIRECTORIES( ${CXXTEST_INCLUDE_DIR} ) # NOTE: old FindCXXTest versions used this name
INCLUDE_DIRECTORIES( SYSTEM ${CXXTEST_INCLUDE_DIRS} )
INCLUDE_DIRECTORIES( SYSTEM ${CXXTEST_INCLUDE_DIR} ) # NOTE: old FindCXXTest versions used this name
IF( OW_USE_TESTS )
SET( OW_COMPILE_TESTS ON ) #We need this variable because this is tested more often.
# Package settings:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment