Skip to content
Snippets Groups Projects
Commit 3122c3cd authored by René Fritze's avatar René Fritze
Browse files

adds compiler id macro to DuneUtils

parent 5992a9dd
No related branches found
No related tags found
No related merge requests found
......@@ -103,4 +103,15 @@ FIND_PACKAGE( PkgConfig )
pkg_check_modules( CCGNU REQUIRED libccgnu2 )
ADD_CXX_FLAGS( "${CCGNU_CFLAGS}" )
INCLUDE_SYS_DIR(${Boost_INCLUDE_DIR})
#try to enable link-time-optimisation
if (CMAKE_COMPILER_IS_GNUCC)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 4.5 OR GCC_VERSION VERSION_EQUAL 4.5)
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto")
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -flto")
endif()
endif()
ENABLE_TESTING()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment