1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- # CMakeLists.txt for FAS package. It creates a library with dictionary and a main program
- cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
- project(MpdFlowScripts)
- # You need to tell CMake where to find the ROOT installation. This can be done
- # in a number of ways:
- # - ROOT built with classic configure/make use the provided
- # $ROOTSYS/etc/cmake/FindROOT.cmake
- # - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix
- # for ROOT
- list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
- #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
- find_package(ROOT REQUIRED COMPONENTS MathCore RIO Hist Tree Net)
- #---Add option if one wants to compile ROOT-only dependent part or full project
- option(ONLY_ROOT "Build targets that require only ROOT package" OFF)
- #---Add FairRoot package
- if(NOT ONLY_ROOT)
- set(FAIRSOFT_PATH $ENV{FAIRROOTPATH}/share/fairbase/cmake/modules)
- list(APPEND CMAKE_MODULE_PATH ${FAIRSOFT_PATH})
- find_package(FairRoot REQUIRED COMPONENTS Base)
- endif()
- #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
- include(${ROOT_USE_FILE})
- set (CMAKE_CXX_STANDARD 11)
- #add_definitions(${ROOT_CXX_FLAGS})
- set(CMAKE_BUILD_TYPE Debug)
- #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -Wall -pthread")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall")
- set(MPDROOTDIR $ENV{VMCWORKDIR})
- option(BUILD_GETDCA "Build target get-dca from project" ON)
- option(BUILD_GETCENTRALITY "Build target get-centrality from project" ON)
- option(BUILD_REDUCEDTREECREATOR "Build target reducedTreeCreator from project" ON)
- #option(BUILD_PICODST "Build target PicoDst format from project" ON)
- option(BUILD_TESTPUREROOT "Build target test_pure_root from project" ON)
- option(BUILD_COUNTER "Build target count-data from project" ON)
- if(NOT ONLY_ROOT)
- if(BUILD_GETDCA)
- add_subdirectory(get-dca)
- endif()
- if(BUILD_GETCENTRALITY)
- add_subdirectory(get-centrality)
- endif()
- # if(BUILD_PICODST)
- # add_subdirectory(PicoDst)
- # endif()
- if(BUILD_REDUCEDTREECREATOR)
- add_subdirectory(reducedTreeCreator)
- endif()
- if(BUILD_TESTPUREROOT)
- add_subdirectory(test_pure_root)
- endif()
- if(BUILD_COUNTER)
- add_subdirectory(count-data)
- endif()
- else(ONLY_ROOT)
- if(BUILD_PICODST)
- add_subdirectory(PicoDst)
- endif()
- if(BUILD_TESTPUREROOT)
- add_subdirectory(test_pure_root)
- endif()
- if(BUILD_COUNTER)
- add_subdirectory(count-data)
- endif()
- endif()
|