Skip to content

Commit

Permalink
Merge pull request #1179 from eflumerf/eflumerf/CMakeUpdates
Browse files Browse the repository at this point in the history
Use "trig" qualifier to disable Geant4-related build items.
  • Loading branch information
kutschke authored Feb 6, 2024
2 parents c7830ae + 206c20c commit 3ab1d5e
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 24 deletions.
18 changes: 15 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,20 @@ cet_set_compiler_flags(DIAGS VIGILANT
-Wno-unused-parameter -Wno-type-limits -Wno-ignored-qualifiers -Wno-unused-but-set-parameter -Wno-extra -Wno-non-virtual-dtor -Wno-implicit-fallthrough -Wno-deprecated-copy
)

if(DEFINED Offline_UPS_QUALIFIER_STRING)
string(FIND ${Offline_UPS_QUALIFIER_STRING} "trig" TRIG_BUILD)
# TRIG_BUILD will be -1 if trig qualifier not found
if(${TRIG_BUILD} GREATER_EQUAL 0)
set(WITH_G4 FALSE)
else()
set(WITH_G4 TRUE)
endif()
endif()

message("WITH_G4 SET TO ${WITH_G4}")

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
message("Creating link from ${CMAKE_CURRENT_SOURCE_DIR} to ${CMAKE_CURRENT_SOURCE_DIR}/Offline to satisfy includes")
file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Offline SYMBOLIC)

find_package(art_root_io REQUIRED EXPORT)
find_package(GSL REQUIRED EXPORT)
Expand All @@ -30,11 +41,12 @@ find_package(artdaq_core_mu2e REQUIRED EXPORT)
if( ${WITH_G4} )
message("--> ADDING G4 LIBS")
find_package(Geant4 REQUIRED EXPORT)
endif()

# TODO: Find or implement FindCRY.cmake
include_directories($ENV{CRYHOME}/src)
link_directories($ENV{CRYHOME}/lib)
endif()


# BTrk and KinKal have non-standard Find*.cmake...
include_directories($ENV{KINKAL_INC})
Expand Down Expand Up @@ -84,7 +96,6 @@ add_subdirectory(DbService)
add_subdirectory(DbTables)
add_subdirectory(DetectorSolenoidGeom)
add_subdirectory(EventDisplay)
add_subdirectory(EventGenerator)
add_subdirectory(EventMixing)
add_subdirectory(ExternalShieldingGeom)
add_subdirectory(ExtinctionMonitorFNAL)
Expand All @@ -104,6 +115,7 @@ add_subdirectory(Mu2e)
add_subdirectory(Mu2eBTrk)
if( ${WITH_G4} )
message("---> ADDING G4 DIRS")
add_subdirectory(EventGenerator)
add_subdirectory(Mu2eG4)
add_subdirectory(Mu2eG4Helper)
endif()
Expand Down
2 changes: 2 additions & 0 deletions CRVConditions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ cet_make_library(
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog.fcl ${CURRENT_BINARY_DIR} fcl/prolog.fcl)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/nominal.txt ${CURRENT_BINARY_DIR} data/nominal.txt)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/CRVConditions)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
install_fhicl(SUBDIRS fcl SUBDIRNAME Offline/CRVConditions/fcl)
2 changes: 2 additions & 0 deletions CalPatRec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/v5_7_7/MLP_weights_logfcons_4_ex
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/v5_7_7/MLP_weights_trkpatrec_logfcons_1_uni.xml ${CURRENT_BINARY_DIR} data/v5_7_7/MLP_weights_trkpatrec_logfcons_1_uni.xml)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/v5_7_7/tpr_qual_logfcons_2_exp.tab ${CURRENT_BINARY_DIR} data/v5_7_7/tpr_qual_logfcons_2_exp.tab)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/CalPatRec)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
install_fhicl(SUBDIRS fcl SUBDIRNAME Offline/CalPatRec/fcl)
2 changes: 2 additions & 0 deletions CaloConditions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ cet_make_library(
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog.fcl ${CURRENT_BINARY_DIR} fcl/prolog.fcl)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/nominal.txt ${CURRENT_BINARY_DIR} data/nominal.txt)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/CaloConditions)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
install_fhicl(SUBDIRS fcl SUBDIRNAME Offline/CaloConditions/fcl)
2 changes: 2 additions & 0 deletions CaloFilters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/ce_bkg_20_BDT.weights.xml ${CURR
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/ce_bkg_ecal_20_BDT.weights.xml ${CURRENT_BINARY_DIR} data/ce_bkg_ecal_20_BDT.weights.xml)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/CE_NN_ReLU.weights.xml ${CURRENT_BINARY_DIR} data/CE_NN_ReLU.weights.xml)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/CaloFilters)

install_source(SUBDIRS src)
install_fhicl(SUBDIRS fcl SUBDIRNAME Offline/CaloFilters/fcl)
2 changes: 2 additions & 0 deletions ConditionsService/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/v5_7_9/pid_muo_dt.tbl ${C
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/v5_7_9/pid_muo_ep_vs_path.tbl ${CURRENT_BINARY_DIR} data/v5_7_9/pid_muo_ep_vs_path.tbl )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/v5_7_9/pid_muo_xdrds.tbl ${CURRENT_BINARY_DIR} data/v5_7_9/pid_muo_xdrds.tbl )

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/ConditionsService)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
2 changes: 2 additions & 0 deletions DbService/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog.fcl ${CURRENT_BINARY_DIR}
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/connections.txt ${CURRENT_BINARY_DIR} data/connections.txt)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/create.sql ${CURRENT_BINARY_DIR} data/create.sql)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/DbService)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
install_fhicl(SUBDIRS fcl SUBDIRNAME Offline/DbService/fcl)
2 changes: 2 additions & 0 deletions GlobalConstantsService/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ cet_build_plugin(GlobalConstantsService art::service
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/globalConstants_01.txt ${CURRENT_BINARY_DIR} data/globalConstants_01.txt)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/ParticleList.txt ${CURRENT_BINARY_DIR} data/ParticleList.txt)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/GlobalConstantsService)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
2 changes: 2 additions & 0 deletions Mu2eKinKal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/TrainSign_Stage1.dat ${CURRENT
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog.fcl ${CURRENT_BINARY_DIR} fcl/prolog.fcl COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog_trigger.fcl ${CURRENT_BINARY_DIR} fcl/prolog_trigger.fcl COPYONLY)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/Mu2eKinKal)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
install_fhicl(SUBDIRS fcl SUBDIRNAME Offline/Mu2eKinKal/fcl)
Expand Down
2 changes: 1 addition & 1 deletion Mu2eUtilities/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/potTimingDistribution_20160511.t
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/potTimingDistribution_38ms.txt ${CURRENT_BINARY_DIR} data/potTimingDistribution_38ms.txt COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/potTimingDistribution_avg.txt ${CURRENT_BINARY_DIR} data/potTimingDistribution_avg.txt COPYONLY)


install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/Mu2eUtilities)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
2 changes: 2 additions & 0 deletions TrackerConditions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/testProditions.fcl ${CURRENT_BI
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/testTrackerAlignment.fcl ${CURRENT_BINARY_DIR} fcl/testTrackerAlignment.fcl COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/testTrackerStatus.fcl ${CURRENT_BINARY_DIR} fcl/testTrackerStatus.fcl COPYONLY)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/TrackerConditions)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
install_fhicl(SUBDIRS fcl SUBDIRNAME Offline/TrackerConditions/fcl)
2 changes: 2 additions & 0 deletions Trigger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@ cet_build_plugin(ReadTriggerInfo art::module

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog_trigger.fcl ${CURRENT_BINARY_DIR} fcl/prolog_trigger.fcl COPYONLY)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/Trigger)

install_source(SUBDIRS src)
install_fhicl(SUBDIRS fcl SUBDIRNAME Offline/Trigger/fcl)
2 changes: 2 additions & 0 deletions TrkDiag/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/TrkCaloHitPID.weights.xml ${CU

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog.fcl ${CURRENT_BINARY_DIR} fcl/prolog.fcl COPYONLY)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/TrkDiag)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
install_fhicl(SUBDIRS fcl SUBDIRNAME Offline/TrkDiag/fcl)
1 change: 1 addition & 0 deletions TrkHitReco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/epilog_stereo.fcl ${CURRENT_BIN
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog.fcl ${CURRENT_BINARY_DIR} fcl/prolog.fcl COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog_trigger.fcl ${CURRENT_BINARY_DIR} fcl/prolog_trigger.fcl COPYONLY)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/TrkHitReco)

install_source(SUBDIRS src inc)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
Expand Down
2 changes: 2 additions & 0 deletions TrkPatRec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/Particle.fcl ${CURRENT_BINARY_D
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog.fcl ${CURRENT_BINARY_DIR} fcl/prolog.fcl COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fcl/prolog_trigger.fcl ${CURRENT_BINARY_DIR} fcl/prolog_trigger.fcl COPYONLY)

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/TrkPatRec)

install_source(SUBDIRS src)
install_headers(USE_PROJECT_NAME SUBDIRS inc)
install_fhicl(SUBDIRS fcl SUBDIRNAME Offline/TrkPatRec/fcl)
32 changes: 12 additions & 20 deletions ups/product_deps
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,17 @@ end_product_list
# case it is optional.
#
qualifier art_root_io gallery geant4 xerces_c artdaq_core_mu2e BTrk KinKal cry gsl
e28:s126:trig:debug e28:debug e28:debug e28:mt:debug e28 e28:s126:debug e28:p3915:debug e28:p3915:debug e28:debug -nq-
e28:s126:trig:prof e28:prof e28:prof e28:mt:prof e28 e28:s126:prof e28:p3915:prof e28:p3915:prof e28:prof -nq-
e28:s126:trig:debug e28:debug e28:debug - e28 e28:s126:debug e28:p3915:debug e28:p3915:debug - -nq-
e28:s126:trig:prof e28:prof e28:prof - e28 e28:s126:prof e28:p3915:prof e28:p3915:prof - -nq-

e28:s124:trig:debug e28:debug e28:debug e28:mt:debug e28 e28:s124:debug e28:p3915:debug e28:p3915:debug e28:debug -nq-
e28:s124:trig:prof e28:prof e28:prof e28:mt:prof e28 e28:s124:prof e28:p3915:prof e28:p3915:prof e28:prof -nq-
e28:s124:trig:debug e28:debug e28:debug - e28 e28:s124:debug e28:p3915:debug e28:p3915:debug - -nq-
e28:s124:trig:prof e28:prof e28:prof - e28 e28:s124:prof e28:p3915:prof e28:p3915:prof - -nq-

e28:s126:debug e28:debug e28:debug e28:mt:debug e28 e28:s126:debug e28:p3915:debug e28:p3915:debug e28:debug -nq-
e28:s126:prof e28:prof e28:prof e28:mt:prof e28 e28:s126:prof e28:p3915:prof e28:p3915:prof e28:prof -nq-

e28:s124:debug e28:debug e28:debug e28:mt:debug e28 e28:s124:debug e28:p3915:debug e28:p3915:debug e28:debug -nq-
e28:s124:prof e28:prof e28:prof e28:mt:prof e28 e28:s124:prof e28:p3915:prof e28:p3915:prof e28:prof -nq-
end_qualifier_list
####################################

Expand All @@ -326,22 +332,8 @@ end_qualifier_list
# be copied to the table file verbatim.
table_fragment_begin

# envSet (MU2E_BASE_RELEASE, \${OFFLINE_DIR} )
# envSet (MU2E_SEARCH_PATH, \${OFFLINE_DIR}/config:\${MU2E_DATA_PATH}:/cvmfs/mu2e.opensciencegrid.org/DataFiles )
# envSet (FHICL_FILE_PATH, \${OFFLINE_DIR}/config:\${OFFLINE_DIR}/config/Offline/fcl )
# envSet (OFFLINE_VERSION, \${UPS_PROD_VERSION} )
# pathAppend( ROOT_INCLUDE_PATH, \${OFFLINE_INC})

# exeActionRequired(GetFQDir)
# envSet (OFFLINE_LIB, \${OFFLINE_DIR}/\${OFFLINE_FQ}/lib )
# pathAppend( CET_PLUGIN_PATH, \${OFFLINE_LIB} )
# pathPrepend(PATH, "\${OFFLINE_DIR}/\${OFFLINE_FQ}/bin")

# if ( test \`uname\` = "Darwin" )
# pathPrepend(DYLD_LIBRARY_PATH, \${\${UPS_PROD_NAME_UC}_LIB})
# else()
# pathPrepend(LD_LIBRARY_PATH, \${\${UPS_PROD_NAME_UC}_LIB})
# endif ( test \`uname\` = "Darwin" )
envPrepend(MU2E_DATA_PATH, \${OFFLINE_DIR}/share:/cvmfs/mu2e.opensciencegrid.org/DataFiles)
envPrepend (MU2E_SEARCH_PATH, \${OFFLINE_DIR}/fcl:\${MU2E_DATA_PATH} )

table_fragment_end
####################################
Expand Down

0 comments on commit 3ab1d5e

Please sign in to comment.