From b86c40a3130221b5cfbed45c691b2491951c1a8e Mon Sep 17 00:00:00 2001 From: lintao <lintao51@gmail.com> Date: Tue, 22 Dec 2020 22:50:18 +0800 Subject: [PATCH] WIP: starting the migration from lcg97 to lcg98 (Gaudi v35) --- Analysis/CMakeLists.txt | 2 ++ Analysis/TotalInvMass/CMakeLists.txt | 18 ++++++++++-------- Analysis/TotalInvMass/src/TotalInvMass.hh | 2 +- CMakeLists.txt | 10 ++++------ build.sh | 4 ++-- setup.sh | 4 ++-- 6 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 Analysis/CMakeLists.txt diff --git a/Analysis/CMakeLists.txt b/Analysis/CMakeLists.txt new file mode 100644 index 00000000..46a842b2 --- /dev/null +++ b/Analysis/CMakeLists.txt @@ -0,0 +1,2 @@ + +add_subdirectory(TotalInvMass) diff --git a/Analysis/TotalInvMass/CMakeLists.txt b/Analysis/TotalInvMass/CMakeLists.txt index f51ee995..1f0acbd8 100644 --- a/Analysis/TotalInvMass/CMakeLists.txt +++ b/Analysis/TotalInvMass/CMakeLists.txt @@ -1,18 +1,20 @@ -gaudi_subdir(TotalInvMass v0r0) find_package(CLHEP REQUIRED;CONFIG) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) find_package(EDM4HEP REQUIRED) -find_package(GEAR REQUIRED) find_package(GSL REQUIRED ) find_package(LCIO REQUIRED ) -find_package(podio REQUIRED ) find_package(k4FWCore REQUIRED) set(TotalInvMass_srcs src/TotalInvMass.cc) -gaudi_add_module(TotalInvMass ${TotalInvMass_srcs} - INCLUDE_DIRS k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_INCLUDE_DIR} DD4hep gear ${GSL_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS} - LINK_LIBRARIES k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_LIBRARIES} DD4hep ${GEAR_LIBRARIES} ${GSL_LIBRARIES} ${LCIO_LIBRARIES} - EDM4HEP::edm4hep EDM4HEP::edm4hepDict +gaudi_add_module(TotalInvMass + SOURCES ${TotalInvMass_srcs} + LINK k4FWCore::k4FWCore + Gaudi::GaudiKernel + Gaudi::GaudiAlgLib + ${CLHEP_LIBRARIES} + ${GSL_LIBRARIES} + ${LCIO_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict + ${ROOT_LIBRARIES} ) diff --git a/Analysis/TotalInvMass/src/TotalInvMass.hh b/Analysis/TotalInvMass/src/TotalInvMass.hh index 98a36eea..97d48d5a 100644 --- a/Analysis/TotalInvMass/src/TotalInvMass.hh +++ b/Analysis/TotalInvMass/src/TotalInvMass.hh @@ -2,7 +2,7 @@ #define _TotalInvMass_hh_ #include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/Property.h" +#include <Gaudi/Property.h> #include "k4FWCore/DataHandle.h" diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e47f29f..384dc76e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,10 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0) +project(CEPCSW) + find_package(ROOT COMPONENTS RIO Tree) -find_package(GaudiProject) +find_package(Gaudi) # Set up C++ Standard # ``-DCMAKE_CXX_STANDARD=<standard>`` when invoking CMake @@ -12,8 +14,4 @@ if(NOT CMAKE_CXX_STANDARD MATCHES "14|17") message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}") endif() - -gaudi_project(CEPCSW v0r1 - USE Gaudi v33r1 - USE k4FWCore v0r1 -) \ No newline at end of file +add_subdirectory(Analysis) diff --git a/build.sh b/build.sh index b7f11d7f..9d5ab33b 100755 --- a/build.sh +++ b/build.sh @@ -77,8 +77,8 @@ function run-make() { ############################################################################## # The current default platform -lcg_platform=x86_64-slc6-gcc8-opt -lcg_version=97.0.2 +lcg_platform=x86_64-centos7-gcc8-opt +lcg_version=98.0.0 check-cepcsw-envvar || exit -1 diff --git a/setup.sh b/setup.sh index bf0d1195..44ff6369 100644 --- a/setup.sh +++ b/setup.sh @@ -30,7 +30,7 @@ function cepcsw-external() { } function setup-external() { - local f=$(cepcsw-external)/setup.sh + local f=$(cepcsw-external)/setup-${CEPCSW_LCG_VERSION}.sh if [ ! -f $f ]; then error: "Failed to find setup script $f" return @@ -49,7 +49,7 @@ function setup-external() { # CEPCSW_LCG_VERSION=${1}; shift if [ -z "$CEPCSW_LCG_VERSION" ]; then - CEPCSW_LCG_VERSION=97.0.2 + CEPCSW_LCG_VERSION=98.0.0 fi export CEPCSW_LCG_VERSION -- GitLab