|
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration |
|
# |
|
# Modified version of the AnalysisBase template |
|
|
|
# Set the minimum required CMake version: |
|
cmake_minimum_required (VERSION 3.14 FATAL_ERROR) |
|
set(CMAKE_CXX_STANDARD 14) |
|
|
|
# Make sure that all _ROOT variables *are* used when they are set. |
|
if( POLICY CMP0074 ) |
|
cmake_policy( SET CMP0074 NEW ) |
|
endif() |
|
|
|
# Find the base project. |
|
find_package( AnalysisBase 21.2 REQUIRED ) |
|
|
|
# Set up the usage of CTest. |
|
atlas_ctest_setup() |
|
|
|
# Make sure that the project-wide rootmap file merge would use xAODAnaHelper's |
|
# dictionary. |
|
set_property( GLOBAL APPEND PROPERTY ATLAS_ROOTMAP_FILES |
|
"${CMAKE_BINARY_DIR}/_deps/xaodanahelpers-build${CMAKE_FILES_DIRECTORY}/xAODAnaHelpersLib.dsomap" ) |
|
set_property( GLOBAL APPEND PROPERTY ATLAS_ROOTMAP_TARGETS "xAODAnaHelpersLib" ) |
|
|
|
atlas_project( example 0.1.0 |
|
USE AnalysisBase 21.2 ) |
|
message("") |
|
|
|
# Get external dependencies |
|
include(FetchContent) |
|
|
|
FetchContent_Declare( |
|
xAODAnaHelpers |
|
GIT_REPOSITORY https://github.com/UCATLAS/xAODAnaHelpers.git |
|
GIT_TAG b3feeb1e34782478900bf060dd5a27eb8d8ed2d7 |
|
) |
|
FetchContent_MakeAvailable(xAODAnaHelpers) |
|
|
|
|
|
# Set up the runtime environment setup script(s): |
|
lcg_generate_env( SH_FILE ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh ) |
|
install( FILES ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh |
|
DESTINATION . ) |
|
|
|
# Set up CPack: |
|
atlas_cpack_setup() |
|
|
|
|
|
## Try to figure out what project is our parent. Just using a hard-coded list |
|
## of possible project names. Basically the names of all the other |
|
## sub-directories inside the Projects/ directory in the repository. |
|
#set( _parentProjectNames Athena AthenaP1 AnalysisBase AthAnalysis |
|
#AthSimulation AthDerivation AnalysisTop ) |
|
#set( _defaultParentProject AnalysisBase ) |
|
#foreach( _pp ${_parentProjectNames} ) |
|
#if( NOT "$ENV{${_pp}_DIR}" STREQUAL "" ) |
|
#set( _defaultParentProject ${_pp} ) |
|
#break() |
|
#endif() |
|
#endforeach() |
|
# |
|
## Set the parent project name based on the previous findings: |
|
#set( ATLAS_PROJECT ${_defaultParentProject} |
|
#CACHE STRING "The name of the parent project to build against" ) |
|
## Clean up: |
|
#unset( _parentProjectNames ) |
|
#unset( _defaultParentProject ) |
|
# |
|
## Pick up a local version of the AtlasCMake code if it exists: |
|
#find_package( AtlasCMake QUIET ) |
|
# |
|
#find_package( ${ATLAS_PROJECT} REQUIRED ) |
|
# |
|
#set(ATLAS_PROJECT_VERSION "${${ATLAS_PROJECT}_VERSION}") |
|
#message("") |
|
#message("-- ATLAS_PROJECT: ${ATLAS_PROJECT} ${ATLAS_PROJECT_VERSION}") |
|
#message("") |
|
# |
|
## Set up CTest. This makes sure that per-package build log files can be |
|
## created if the user so chooses. |
|
#atlas_ctest_setup() |
|
# |
|
#atlas_project( example 0.1.0 |
|
#USE ${ATLAS_PROJECT} ${ATLAS_PROJECT_VERSION} ) |
|
#message("") |
|
# |
|
# |
|
# |
|
## Set up the runtime environment setup script(s): |
|
#lcg_generate_env( SH_FILE ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh ) |
|
#install( FILES ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh |
|
#DESTINATION . ) |
|
# |
|
## Set up CPack: |
|
#atlas_cpack_setup() |