diff --git a/gtpc/CMakeLists.txt b/gtpc/CMakeLists.txt index 7ef835a..5c0892b 100644 --- a/gtpc/CMakeLists.txt +++ b/gtpc/CMakeLists.txt @@ -12,64 +12,42 @@ ############################################################################## # Create a library called "libR3BGTPC" which includes the source files given in # the array . -# The extension is already found. Any number of sources could be listed here. - -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -#put here all directories where header files are located -${R3BROOT_SOURCE_DIR}/r3bbase -${R3BROOT_SOURCE_DIR}/r3bdata -${R3BGTPC_SOURCE_DIR}/gtpc -${R3BGTPC_SOURCE_DIR}/gtpcmap -${R3BGTPC_SOURCE_DIR}/gtpcdata -#${R3BGTPC_SOURCE_DIR}/gtpcreconstruction/triplclust/src -#${R3BGTPC_SOURCE_DIR}/gtpcreconstruction/ -${R3BROOT_SOURCE_DIR}/field -${Boost_INCLUDE_DIRS} -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) set(SRCS -#Put here your sourcefiles -R3BGTPC.cxx -R3BGTPCProjector.cxx -R3BGTPCLangevin.cxx -R3BGTPCLangevinTest.cxx -R3BGTPCContFact.cxx -R3BGTPCGeoPar.cxx -R3BGTPCGasPar.cxx -R3BGTPCElecPar.cxx -#R3BGTPCHitPar.cxx -R3BGTPCCalPar.cxx -#R3BGTPCMappedPar.cxx -R3BGTPCCal2Hit.cxx -R3BGTPCMapped2Cal.cxx -#R3BGTPCHit2Track.cxx -#R3BGTPCCal2HitPar.cxx -#R3BGTPCMapped2CalPar.cxx + #Put here your sourcefiles + R3BGTPC.cxx + R3BGTPCProjector.cxx + R3BGTPCLangevin.cxx + R3BGTPCLangevinTest.cxx + R3BGTPCContFact.cxx + R3BGTPCGeoPar.cxx + R3BGTPCGasPar.cxx + R3BGTPCElecPar.cxx + #R3BGTPCHitPar.cxx + R3BGTPCCalPar.cxx + #R3BGTPCMappedPar.cxx + R3BGTPCCal2Hit.cxx + R3BGTPCMapped2Cal.cxx + #R3BGTPCHit2Track.cxx + #R3BGTPCCal2HitPar.cxx + #R3BGTPCMapped2CalPar.cxx ) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF GTPCLinkDef.h) -set(LIBRARY_NAME R3BGTPC) -set(DEPENDENCIES - R3BBase R3BGTPCData R3BGTPCMap) - #R3BGTPCReconstruction) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + R3BGTPC + LINKDEF + GTPCLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BGTPCData + R3BGTPCMap) diff --git a/gtpcdata/CMakeLists.txt b/gtpcdata/CMakeLists.txt index 593de09..4890d7d 100644 --- a/gtpcdata/CMakeLists.txt +++ b/gtpcdata/CMakeLists.txt @@ -2,45 +2,31 @@ # the array . # The extension is already found. Any number of sources could be listed here. -Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overloaded-virtual") - -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -${R3BROOT_SOURCE_DIR}/r3bdata -${R3BGTPC_SOURCE_DIR}/gtpcdata -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) - set(SRCS -R3BGTPCPoint.cxx -R3BGTPCProjPoint.cxx -R3BGTPCMappedData.cxx -R3BGTPCCalData.cxx -R3BGTPCHitData.cxx -R3BGTPCHitClusterData.cxx -R3BGTPCTrackData.cxx -) + R3BGTPCPoint.cxx + R3BGTPCProjPoint.cxx + R3BGTPCMappedData.cxx + R3BGTPCCalData.cxx + R3BGTPCHitData.cxx + R3BGTPCHitClusterData.cxx + R3BGTPCTrackData.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF R3BGTPCDataLinkDef.h) -set(LIBRARY_NAME R3BGTPCData) -set(DEPENDENCIES - R3BTracking Core m) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + R3BGTPCData + LINKDEF + R3BGTPCDataLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BTracking) + +target_compile_options(R3BGTPCData PRIVATE -Wno-overloaded-virtual) diff --git a/gtpceve/CMakeLists.txt b/gtpceve/CMakeLists.txt index fd023da..ba55e28 100644 --- a/gtpceve/CMakeLists.txt +++ b/gtpceve/CMakeLists.txt @@ -12,47 +12,24 @@ ############################################################################## # Create a library called "libR3BGTPC" which includes the source files given in # the array . -# The extension is already found. Any number of sources could be listed here. -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -#put here all directories where header files are located -${R3BROOT_SOURCE_DIR}/r3bbase -${R3BROOT_SOURCE_DIR}/r3bdata -${R3BGTPC_SOURCE_DIR}/gtpc -${R3BGTPC_SOURCE_DIR}/gtpcdata -${R3BGTPC_SOURCE_DIR}/gtpceve -${R3BGTPC_SOURCE_DIR}/gtpcmap -${R3BROOT_SOURCE_DIR}/field -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) - -set(SRCS -#Put here your sourcefiles -R3BGTPCEventManager.cxx -R3BGTPCEventDrawTask.cxx -) +set(SRCS R3BGTPCEventManager.cxx R3BGTPCEventDrawTask.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF GTPCEveLinkDef.h) -set(LIBRARY_NAME R3BGTPCEve) -set(DEPENDENCIES - R3BBase R3BGTPCData R3BGTPCMap EventDisplay Eve Gui Ged RGL Graf3d) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + R3BGTPCEve + LINKDEF + GTPCEveLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BGTPCData + R3BGTPCMap) diff --git a/gtpcmap/CMakeLists.txt b/gtpcmap/CMakeLists.txt index 9decc5f..9bea4de 100644 --- a/gtpcmap/CMakeLists.txt +++ b/gtpcmap/CMakeLists.txt @@ -1,42 +1,36 @@ +############################################################################## +# Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH # +# Copyright (C) 2019 Members of R3B Collaboration # +# # +# This software is distributed under the terms of the # +# GNU General Public Licence (GPL) version 3, # +# copied verbatim in the file "LICENSE". # +# # +# In applying this license GSI does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################## # Create a library called "libR3BGTPCMAP" which includes the source files given in # the array . -# The extension is already found. Any number of sources could be listed here. -Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overloaded-virtual") - -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -${ROOT_INCLUDE_DIR} -${Boost_INCLUDE_DIRS} -${R3BGTPC_SOURCE_DIR}/gtpcmap -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) - -set(SRCS -R3BGTPCMap.cxx -) +set(SRCS R3BGTPCMap.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF R3BGTPCMapLinkDef.h) -set(LIBRARY_NAME R3BGTPCMap) -set(DEPENDENCIES - Hist Core m) - -GENERATE_LIBRARY() - +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + R3BGTPCMap + LINKDEF + R3BGTPCMapLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BBase) + +target_compile_options(R3BGTPCMap PRIVATE -Wno-overloaded-virtual) diff --git a/gtpcreconstruction/CMakeLists.txt b/gtpcreconstruction/CMakeLists.txt index 8a671d5..e676295 100644 --- a/gtpcreconstruction/CMakeLists.txt +++ b/gtpcreconstruction/CMakeLists.txt @@ -12,58 +12,36 @@ ############################################################################## # Create a library called "libR3BGTPCReconstruction" which includes the source files given in # the array . -# The extension is already found. Any number of sources could be listed here. - -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -#put here all directories where header files are located -${R3BROOT_SOURCE_DIR}/r3bbase -${R3BROOT_SOURCE_DIR}/r3bdata -${R3BGTPC_SOURCE_DIR}/gtpc -${R3BGTPC_SOURCE_DIR}/gtpcdata -${R3BROOT_SOURCE_DIR}/field -${R3BGTPC_SOURCE_DIR}/gtpcreconstruction -${R3BGTPC_SOURCE_DIR}/gtpcreconstruction/triplclust/src -${R3BGTPC_SOURCE_DIR}/gtpcreconstruction/triplclust/src/hclust -${R3BGTPC_SOURCE_DIR}/gtpcreconstruction/triplclust/src/kdtree -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) set(SRCS -triplclust/src/cluster.cxx -triplclust/src/triplet.cxx -#triplclust/src/main.cpp -triplclust/src/dnn.cxx -triplclust/src/hclust/fastcluster.cxx -triplclust/src/kdtree/kdtree.cxx -triplclust/src/pointcloud.cxx -triplclust/src/output.cxx -triplclust/src/option.cxx -triplclust/src/util.cxx -triplclust/src/graph.cxx -R3BGTPCTrackFinder.cxx -) + triplclust/src/cluster.cxx + triplclust/src/triplet.cxx + #triplclust/src/main.cpp + triplclust/src/dnn.cxx + triplclust/src/hclust/fastcluster.cxx + triplclust/src/kdtree/kdtree.cxx + triplclust/src/pointcloud.cxx + triplclust/src/output.cxx + triplclust/src/option.cxx + triplclust/src/util.cxx + triplclust/src/graph.cxx + R3BGTPCTrackFinder.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF R3BGTPCReconstructionLinkDef.h) -set(LIBRARY_NAME R3BGTPCReconstruction) -set(DEPENDENCIES - R3BBase R3BGTPCData) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + R3BGTPCReconstruction + LINKDEF + R3BGTPCReconstructionLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/triplclust/src + DEPENDENCIES + R3BGTPCData)