Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cmake targets #31

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 16 additions & 31 deletions field/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,22 @@
# 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
${R3BROOT_SOURCE_DIR}/field
${R3BFRS_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
FRSWasaFieldMap.cxx
)
set(SRCS FRSWasaFieldMap.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 FRSFieldLinkDef.h)
set(LIBRARY_NAME FRSWASAFIELD)
set(DEPENDENCIES
Base )

GENERATE_LIBRARY()
change_file_extension(*.cxx *.h HEADERS "${SRCS}")

add_library_with_dictionary(
LIBNAME
FRSWASAFIELD
LINKDEF
FRSFieldLinkDef.h
HEADERS
${HEADERS}
SRCS
${SRCS}
INCLUDEDIRS
${CMAKE_CURRENT_SOURCE_DIR}
DEPENDENCIES
Field)
80 changes: 33 additions & 47 deletions frsdata/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,40 @@
# 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
${R3BROOT_SOURCE_DIR}/r3bdata
${R3BFRS_SOURCE_DIR}/frsdata
)

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
R3BSeetramCalData.cxx
R3BFrsMappedData.cxx
FRSMusicMappedData.cxx
FRSMusicCalData.cxx
FRSMusicHitData.cxx
R3BTpcMappedData.cxx
R3BTpcCalData.cxx
R3BTpcHitData.cxx
R3BFrsS4Data.cxx
R3BMwMappedData.cxx
R3BMwHitData.cxx
R3BMdcMappedData.cxx
WASATofPoint.cxx
WASAMdcPoint.cxx
FrsSpillMappedData.cxx
VftxSciMappedData.cxx
FrsSciTcalData.cxx
FrsSciSingleTcalData.cxx
)
R3BSeetramCalData.cxx
R3BFrsMappedData.cxx
FRSMusicMappedData.cxx
FRSMusicCalData.cxx
FRSMusicHitData.cxx
R3BTpcMappedData.cxx
R3BTpcCalData.cxx
R3BTpcHitData.cxx
R3BFrsS4Data.cxx
R3BMwMappedData.cxx
R3BMwHitData.cxx
R3BMdcMappedData.cxx
WASATofPoint.cxx
WASAMdcPoint.cxx
FrsSpillMappedData.cxx
VftxSciMappedData.cxx
FrsSciTcalData.cxx
FrsSciSingleTcalData.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 FRSDataLinkDef.h)
set(LIBRARY_NAME R3BFRSData)
set(DEPENDENCIES
Base FairTools R3BData)

GENERATE_LIBRARY()
change_file_extension(*.cxx *.h HEADERS "${SRCS}")

add_library_with_dictionary(
LIBNAME
R3BFRSData
LINKDEF
FRSDataLinkDef.h
HEADERS
${HEADERS}
SRCS
${SRCS}
INCLUDEDIRS
${CMAKE_CURRENT_SOURCE_DIR}
DEPENDENCIES
R3BData)
83 changes: 33 additions & 50 deletions frsdetectors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,40 @@
# 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
${R3BROOT_SOURCE_DIR}/r3bdata
${R3BROOT_SOURCE_DIR}/r3bdata/wrData
${R3BROOT_SOURCE_DIR}/r3bbase
${R3BFRS_SOURCE_DIR}/frsdata
${R3BFRS_SOURCE_DIR}/frsdetectors
)

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
R3BFrsContFact.cxx
R3BSeetramMapped2Cal.cxx
R3BSeetramCalPar.cxx
FRSMusicMapped2CalPar.cxx
FRSMusicMapped2Cal.cxx
FRSMusicCalPar.cxx
FRSMusicHitPar.cxx
FRSMusicCal2HitPar.cxx
FRSMusicCal2Hit.cxx
R3BTpcCalPar.cxx
R3BTpcMapped2CalPar.cxx
R3BTpcMapped2Cal.cxx
R3BTpcCal2Hit.cxx
R3BFrsHit2AnaS4.cxx
R3BFrsHit2AnaS4Par.cxx
R3BFrsAnaPar.cxx
R3BMWMapped2Hit.cxx
FrsRatesSpill.cxx
)
R3BFrsContFact.cxx
R3BSeetramMapped2Cal.cxx
R3BSeetramCalPar.cxx
FRSMusicMapped2CalPar.cxx
FRSMusicMapped2Cal.cxx
FRSMusicCalPar.cxx
FRSMusicHitPar.cxx
FRSMusicCal2HitPar.cxx
FRSMusicCal2Hit.cxx
R3BTpcCalPar.cxx
R3BTpcMapped2CalPar.cxx
R3BTpcMapped2Cal.cxx
R3BTpcCal2Hit.cxx
R3BFrsHit2AnaS4.cxx
R3BFrsHit2AnaS4Par.cxx
R3BFrsAnaPar.cxx
R3BMWMapped2Hit.cxx
FrsRatesSpill.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 FRSDetLinkDef.h)
set(LIBRARY_NAME R3BFRS)
set(DEPENDENCIES
Spectrum Base FairTools R3BData R3BBase)

GENERATE_LIBRARY()
change_file_extension(*.cxx *.h HEADERS "${SRCS}")

add_library_with_dictionary(
LIBNAME
R3BFRS
LINKDEF
FRSDetLinkDef.h
HEADERS
${HEADERS}
SRCS
${SRCS}
INCLUDEDIRS
${CMAKE_CURRENT_SOURCE_DIR}
DEPENDENCIES
R3BFRSData)
51 changes: 16 additions & 35 deletions frsgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,22 @@
# 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
${R3BROOT_SOURCE_DIR}/field
${R3BROOT_SOURCE_DIR}/generators
${R3BROOT_SOURCE_DIR}/r3bgen
${R3BROOT_SOURCE_DIR}/r3bdata
${R3BFRS_SOURCE_DIR}/frsgen
)

include_directories( ${INCLUDE_DIRECTORIES})
include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES})

set(LINK_DIRECTORIES
${ROOT_LIBRARY_DIR}
${FairLogger_LIBDIR}
${FAIRROOT_LIBRARY_DIR}
)

link_directories( ${LINK_DIRECTORIES})

set(SRCS
FRSResonanceGenerator.cxx
)
set(SRCS FRSResonanceGenerator.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 FRSGenLinkDef.h)
set(LIBRARY_NAME FrsGen)
set(DEPENDENCIES
FairTools Field Gen R3BData)

GENERATE_LIBRARY()
change_file_extension(*.cxx *.h HEADERS "${SRCS}")

add_library_with_dictionary(
LIBNAME
FrsGen
LINKDEF
FRSGenLinkDef.h
HEADERS
${HEADERS}
SRCS
${SRCS}
INCLUDEDIRS
${CMAKE_CURRENT_SOURCE_DIR}
DEPENDENCIES
R3BData)
80 changes: 30 additions & 50 deletions frssource/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,37 @@
# 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}
${ucesb_INCLUDE_DIR}
)

set(INCLUDE_DIRECTORIES
#put here all directories where header files are located
${R3BROOT_SOURCE_DIR}/r3bsource/base
${R3BROOT_SOURCE_DIR}/r3bbase
${R3BROOT_SOURCE_DIR}/r3bdata
${R3BROOT_SOURCE_DIR}/r3bdata/wrData
${R3BFRS_SOURCE_DIR}/frssource
${R3BFRS_SOURCE_DIR}/frsdata
)

set(LINK_DIRECTORIES
${ROOT_LIBRARY_DIR}
${FAIRROOT_LIBRARY_DIR}
${ucesb_LIBRARY_DIR}
)

include_directories( ${INCLUDE_DIRECTORIES})
include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES})
link_directories( ${LINK_DIRECTORIES})

set(SRCS
#R3BFrsReader.cxx
VftxSciReader.cxx
R3BFrsReaderNov19.cxx
FrsMusicReader.cxx
FrsTpcReader.cxx
R3BWasaReader.cxx
)

Set(STRUCT_HEADERS
ext_h101_frs.h
ext_h101_tpc.h
ext_h101_frssci.h
ext_h101_frsmusic.h
ext_h101_wasa.h
)
#R3BFrsReader.cxx
VftxSciReader.cxx
R3BFrsReaderNov19.cxx
FrsMusicReader.cxx
FrsTpcReader.cxx
R3BWasaReader.cxx)

set(STRUCT_HEADERS
ext_h101_frs.h
ext_h101_tpc.h
ext_h101_frssci.h
ext_h101_frsmusic.h
ext_h101_wasa.h)

# fill list of header files from list of source files
# by exchanging the file extension
CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}")
Set(HEADERS ${STRUCT_HEADERS} ${HEADERS})

set(LINKDEF_FILE SourceLinkDef.h)
set(DEPENDENCIES
R3BBase Base R3BFRS R3Bsource ${ucesb_LIBRARY_SHARED} FairTools)
set(LIBRARY_NAME R3BFRSSource)

GENERATE_LIBRARY()
change_file_extension(*.cxx *.h HEADERS "${SRCS}")
set(HEADERS ${STRUCT_HEADERS} ${HEADERS})

add_library_with_dictionary(
LIBNAME
R3BFRSSource
LINKDEF
SourceLinkDef.h
HEADERS
${HEADERS}
SRCS
${SRCS}
INCLUDEDIRS
${CMAKE_CURRENT_SOURCE_DIR}
DEPENDENCIES
R3BFRS
R3BSource)
Loading
Loading