From 864fc34edb3c298726d28272a1f9624a98300265 Mon Sep 17 00:00:00 2001 From: Christoph Hasse Date: Mon, 20 Sep 2021 16:12:01 +0200 Subject: [PATCH] fix: move to modern cmake and fix dev4 slot on the way --- CMakeLists.txt | 39 ++++++++++++++------------- HltEfficiencyChecker/CMakeLists.txt | 7 +++-- HltIntegrationTests/CMakeLists.txt | 2 +- cmake/MooreAnalysisDependencies.cmake | 34 +++++++++++++++++++++++ lhcbproject.yml | 7 +++++ 5 files changed, 66 insertions(+), 23 deletions(-) create mode 100644 cmake/MooreAnalysisDependencies.cmake create mode 100644 lhcbproject.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index a2655c5..9f4325c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,23 +8,26 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ############################################################################### -CMAKE_MINIMUM_REQUIRED(VERSION 3.14) -project(MooreAnalysis LANGUAGES CXX) +CMAKE_MINIMUM_REQUIRED(VERSION 3.15) +project(MooreAnalysis VERSION 1.1 + LANGUAGES CXX) -#--------------------------------------------------------------- -# Load macros and functions for Gaudi-based projects -find_package(GaudiProject) -#--------------------------------------------------------------- +# Enable testing with CTest/CDash +include(CTest) -# Declare project name and version -gaudi_project(MooreAnalysis v1r1 - USE Allen v1r4 - Moore v52r2 - Analysis v34r0 - DATA AppConfig VERSION v3r* - FieldMap VERSION v5r* - PRConfig VERSION v1r* - ParamFiles VERSION v8r* - RawEventFormat - TCK/HltTCK VERSION v3r* - TMVAWeights VERSION v1r*) + +list(PREPEND CMAKE_MODULE_PATH + ${PROJECT_SOURCE_DIR}/cmake +) + +# Dependencies +set(WITH_MooreAnalysis_PRIVATE_DEPENDENCIES TRUE) +include(MooreAnalysisDependencies) + +lhcb_add_subdirectories( + HltEfficiencyChecker + HltIntegrationTests +) + + +lhcb_finalize_configuration(NO_EXPORT) diff --git a/HltEfficiencyChecker/CMakeLists.txt b/HltEfficiencyChecker/CMakeLists.txt index ee83e21..5dedfa9 100644 --- a/HltEfficiencyChecker/CMakeLists.txt +++ b/HltEfficiencyChecker/CMakeLists.txt @@ -9,9 +9,8 @@ # or submit itself to any jurisdiction. # ############################################################################### -find_package(pytools) -gaudi_install_python_modules() -gaudi_install_scripts(hlt_eff_checker.py) +gaudi_add_tests(QMTest) -gaudi_add_test(QMTest QMTEST) +gaudi_install(PYTHON) +gaudi_install(SCRIPTS) diff --git a/HltIntegrationTests/CMakeLists.txt b/HltIntegrationTests/CMakeLists.txt index 294c334..77d1ef8 100644 --- a/HltIntegrationTests/CMakeLists.txt +++ b/HltIntegrationTests/CMakeLists.txt @@ -9,4 +9,4 @@ # or submit itself to any jurisdiction. # ############################################################################### -gaudi_add_test(QMTest QMTEST) +gaudi_add_tests(QMTest) diff --git a/cmake/MooreAnalysisDependencies.cmake b/cmake/MooreAnalysisDependencies.cmake new file mode 100644 index 0000000..7343bb4 --- /dev/null +++ b/cmake/MooreAnalysisDependencies.cmake @@ -0,0 +1,34 @@ +############################################################################### +# (c) Copyright 2000-2021 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN 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. # +############################################################################### +if(NOT COMMAND lhcb_find_package) + # Look for LHCb find_package wrapper + find_file(LHCbFindPackage_FILE LHCbFindPackage.cmake) + if(LHCbFindPackage_FILE) + include(${LHCbFindPackage_FILE}) + else() + # if not found, use the standard find_package + macro(lhcb_find_package) + find_package(${ARGV}) + endmacro() + endif() +endif() + +# -- Public dependencies +lhcb_find_package(Moore REQUIRED) +lhcb_find_package(Allen REQUIRED) +lhcb_find_package(Analysis REQUIRED) + + +# -- Private dependencies +if(WITH_MooreAnalysis_PRIVATE_DEPENDENCIES) + # no private dependencies +endif() + diff --git a/lhcbproject.yml b/lhcbproject.yml new file mode 100644 index 0000000..b3d85e7 --- /dev/null +++ b/lhcbproject.yml @@ -0,0 +1,7 @@ +--- +name: MooreAnalysis +license: GPL-3.0-only +dependencies: + - Moore + - Allen + - Analysis -- GitLab