@@ -7,7 +7,7 @@ EndIf (Boost_Avail)
77
88# Set the build type. Possibilities are None, Debug, Release,
99# RelWithDebInfo and MinSizeRel
10- # SET(CMAKE_BUILD_TYPE Debug )
10+ SET (CMAKE_BUILD_TYPE Release )
1111
1212# either, the environment variable RAVEPATH has to be specified, and RAVE's pkgConfig will be used to determine everything we need
1313# or, RAVE_LDFLAGS, RAVE_INCLUDE_DIRS and RAVE_CFLAGS have to be set via the command-line
@@ -23,7 +23,7 @@ IF(DEFINED ENV{RAVEPATH})
2323ELSEIF (DEFINED RAVE_LDFLAGS)
2424 IF (DEFINED RAVE_INCLUDE_DIRS)
2525 IF (DEFINED RAVE_CFLAGS)
26- MESSAGE ("RAVE_LDFLAGS, RAVE_INCLUDE_DIRS and RAVE_CFLAGS are set. Try to build GFRave." )
26+ MESSAGE ("RAVE_LDFLAGS, RAVE_INCLUDE_DIRS and RAVE_CFLAGS are set. Try to build GFRave. ${RAVE_LDFLAGS} " )
2727 SET (RAVE True )
2828 ENDIF ()
2929 ENDIF ()
@@ -78,15 +78,20 @@ ENDIF(NOT CMAKE_BUILD_TYPE)
7878#SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
7979
8080include (CheckCXXCompilerFlag)
81- check_cxx_compiler_flag(-std=c++03 HAS_STD_FLAG)
82- check_cxx_compiler_flag(--std=c++03 HAS_STD_FLAG_ALTERNATIVE)
83- if (HAS_STD_FLAG)
81+ # ROOT 6 requires c++11 support, enforced via headers
82+ If (ROOT_FOUND_VERSION LESS 59999)
83+ check_cxx_compiler_flag(-std=c++03 HAS_STD_FLAG)
84+ check_cxx_compiler_flag(--std=c++03 HAS_STD_FLAG_ALTERNATIVE)
85+ if (HAS_STD_FLAG)
8486 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03" )
85- elseif (HAS_STD_FLAG_ALTERNATIVE)
87+ elseif (HAS_STD_FLAG_ALTERNATIVE)
8688 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++03" )
87- else ()
89+ else ()
8890 message ("Neither --std=c++03 nor -std=c++03 seem to work. Moving on." )
89- endif ()
91+ endif ()
92+ else ()
93+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
94+ EndIf ()
9095
9196# require proper c++, standard is C++03, flag reads: c++98
9297SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wno-long-long -Wshadow -Werror=overloaded-virtual" )
@@ -282,7 +287,7 @@ link_directories( ${LINK_DIRECTORIES})
282287Set (SRCS ${library_sources} )
283288Set (HEADERS)
284289Set (LIBRARY_NAME genfit)
285- Set (DEPENDENCIES Cint Core Geom Matrix Eve Gui Physics MathCore EG)
290+ Set (DEPENDENCIES Core Geom Matrix Eve Gui Physics MathCore EG)
286291
287292Set (LINKDEF
288293${CMAKE_CURRENT_SOURCE_DIR} /core/src/coreLinkDef.h
@@ -297,14 +302,15 @@ ${CMAKE_CURRENT_SOURCE_DIR}/utilities/src/utilitiesLinkDef.h
297302if (DEFINED RAVE)
298303 Set (LINKDEF ${LINKDEF} ${CMAKE_CURRENT_SOURCE_DIR} /GFRave/src/GFRaveLinkDef.h)
299304endif ()
300- ROOT_GENERATE_ROOTMAP()
305+ If (ROOT_FOUND_VERSION LESS 59999)
306+ ROOT_GENERATE_ROOTMAP()
307+ EndIf ()
301308
302309# to not call again ROOT_GENERATE_ROOTMAP
303310Set (LINKDEF)
304311
305312GENERATE_LIBRARY()
306313
307-
308314# the examples, build with "make tests"
309315ADD_CUSTOM_TARGET ( tests )
310316MACRO ( ADD_GENFIT_TEST _testname )
0 commit comments