Advanced Computing Platform for Theoretical Physics

Commit f3e77417 authored by ralfulrich's avatar ralfulrich
Browse files

better (less) ROOT support

parent c6ee65e1
......@@ -12,6 +12,7 @@ endmacro ()
# Enable/Disable models to be built
CRMC_OPTION (CRMC_STATIC "Build with static library" OFF) #if ON should not combined DPMJET/PHOJET/PYTHIA because they use different version of pythia (for dynamic library no problem)
CRMC_OPTION (CRMC_ENABLE_ROOT "Build with ROOT support" OFF) # not encouraged! Please use HepMC
CRMC_OPTION (CRMC_QGSJET01 "Build with QGSJet 2003" OFF)
CRMC_OPTION (CRMC_GHEISHA "Build with GHeisha 2002" OFF)
......@@ -143,21 +144,24 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
FIND_PACKAGE (Root)
if (Root_FOUND)
INCLUDE_DIRECTORIES ("${ROOT_INCLUDE_DIR}")
LIST(APPEND CRMC_SOURCES src/OutputPolicyROOT.cc)
LIST(APPEND CRMC_HEADERS src/OutputPolicyROOT.h)
string(REPLACE "-m64" "" ROOT_CPPFLAGS "${ROOT_CPPFLAGS}")
string(REPLACE "-pthread" "" ROOT_CPPFLAGS "${ROOT_CPPFLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CPPFLAGS}")
if (CRMC_ENABLE_ROOT)
message("ROOT output is not encouraged. Consider HepMC or Rivet.")
FIND_PACKAGE (Root)
if (Root_FOUND)
INCLUDE_DIRECTORIES ("${ROOT_INCLUDE_DIR}")
LIST(APPEND CRMC_SOURCES src/OutputPolicyROOT.cc)
LIST(APPEND CRMC_HEADERS src/OutputPolicyROOT.h)
string(REPLACE "-m64" "" ROOT_CPPFLAGS "${ROOT_CPPFLAGS}")
string(REPLACE "-pthread" "" ROOT_CPPFLAGS "${ROOT_CPPFLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CPPFLAGS}")
set_property(SOURCE src/CRMC.cc src/CRMCoptions.cc src/crmcMain.cc
APPEND PROPERTY COMPILE_DEFINITIONS WITH_ROOT)
MESSAGE("Build ROOT Output Interface")
else (Root_FOUND)
MESSAGE("Cannot Build ROOT Output Interface")
endif (Root_FOUND)
set_property(SOURCE src/CRMC.cc src/CRMCoptions.cc src/crmcMain.cc
APPEND PROPERTY COMPILE_DEFINITIONS WITH_ROOT)
MESSAGE("Build ROOT Output Interface")
else (Root_FOUND)
MESSAGE("Cannot Build ROOT Output Interface")
endif (Root_FOUND)
endif (CRMC_ENABLE_ROOT)
# SET(Boost_DEBUG TRUE)
......
......@@ -62,7 +62,7 @@ IF (ROOTSYS)
SET(_have_MIN_ROOT_VER 1)
ENDIF ("${ROOT_VERSION}" VERSION_GREATER ${ROOT_MIN_REQUIRED_VERSION})
IF (${_have_MIN_ROOT_VER} GREATER 0 OR ${_have_MIN_ROOT_VER} EQUAL 0)
IF (${_have_MIN_ROOT_VER})
# --------------------------------------------------------------------------
# Set ROOT compilation flags.
# --------------------------------------------------------------------------
......@@ -141,7 +141,7 @@ IF (ROOTSYS)
SET (ROOT_QTROOT_LIBRARIES ${_ROOT_GQT_LIBRARY} ${_ROOT_QTROOT_LIBRARY} ${ROOT_GUI_LIBRARIES})
ENDIF (_ROOT_GQT_LIBRARY AND _ROOT_QTROOT_LIBRARY)
ELSE (${_have_MIN_ROOT_VER} GREATER 0 OR ${_have_MIN_ROOT_VER} EQUAL 0)
ELSE (${_have_MIN_ROOT_VER})
SET (Root_FOUND FALSE)
SET (HAVE_ROOT 0)
......@@ -152,7 +152,7 @@ IF (ROOTSYS)
"Minimum required version: ${ROOT_MIN_REQUIRED_VERSION}")
ENDIF (NOT Root_FIND_QUIETLY)
ENDIF (${_have_MIN_ROOT_VER} GREATER 0 OR ${_have_MIN_ROOT_VER} EQUAL 0)
ENDIF (${_have_MIN_ROOT_VER})
ENDIF (ROOTSYS)
......
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