From a291138b45f69da8b25383ddd4b6e9d23c29fce7 Mon Sep 17 00:00:00 2001 From: Attila Krasznahorkay <krasznaa@cern.ch> Date: Tue, 3 May 2016 19:08:38 +0200 Subject: [PATCH] Making the package build in standalone mode with CMake (PATCore-00-00-24) * Made the package build successfully in standalone mode with CMake. * One could still argue though whether the builds should not be more unified finally. To be done in a next round. * Tagging as PATCore-00-00-24 --- .../AnalysisCommon/PATCore/CMakeLists.txt | 49 +++++++++++++++++++ .../AnalysisCommon/PATCore/cmt/requirements | 4 -- 2 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt new file mode 100644 index 00000000000..db446d6ed5b --- /dev/null +++ b/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt @@ -0,0 +1,49 @@ +# $Id: CMakeLists.txt 744640 2016-05-03 19:08:14Z krasznaa $ +################################################################################ +# Package: PATCore +################################################################################ + +# Declare the package name: +atlas_subdir( PATCore ) + +# Extra dependencies, based on what environment we are in: +if( NOT XAOD_STANDALONE ) + set( extra_deps GaudiKernel ) + set( extra_libs GaudiKernel ) +endif() + +# Declare the package's dependencies: +atlas_depends_on_subdirs( + PUBLIC + Control/AthContainers + Control/AthToolSupport/AsgTools + ${extra_deps} ) + +# External dependencies: +find_package( ROOT COMPONENTS Core ) + +# In the standalone build create a "CINT dictionary": +if( XAOD_STANDALONE ) + atlas_add_root_dictionary( PATCoreLib PATCoreLibDictSource + ROOT_HEADERS PATCore/TAccept.h PATCore/TResult.h + PATCore/TSelectorToolBase.h PATCore/TCalculatorToolBase.h Root/LinkDef.h + EXTERNAL_PACKAGES ROOT ) +endif() + +# Component(s) in the package: +atlas_add_library( PATCoreLib + PATCore/*.h Root/*.cxx ${PATCoreLibDictSource} + PUBLIC_HEADERS PATCore + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AsgTools ${extra_libs} ) + +# Only build the "Reflex dictionary" in the offline environment: +if( NOT XAOD_STANDALONE ) + atlas_add_dictionary( PATCoreDict + PATCore/PATCoreDict.h + PATCore/selection.xml + LINK_LIBRARIES PATCoreLib ) +endif() + +# Install files from the package: +atlas_install_python_modules( python/*.py ) diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/cmt/requirements b/PhysicsAnalysis/AnalysisCommon/PATCore/cmt/requirements index 9f7a6bde189..e53276720fe 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATCore/cmt/requirements +++ b/PhysicsAnalysis/AnalysisCommon/PATCore/cmt/requirements @@ -11,13 +11,10 @@ use AtlasReflex AtlasReflex-* External use GaudiInterface GaudiInterface-* External use AthContainers AthContainers-* Control - - ## macros apply_tag ROOTBasicLibs apply_tag ROOTMathLibs - ## declare the directories CMT should know about branches python share Root @@ -32,7 +29,6 @@ apply_pattern declare_python_modules files="*.py" ## install our job options files apply_pattern declare_joboptions files="*.py" - ## For reflex dictionary generation use AtlasReflex AtlasReflex-* External -no_auto_imports apply_pattern lcgdict dict=PATCore selectionfile=selection.xml headerfiles="..\/PATCore/PATCoreDict.h" -- GitLab