forked from AliceO2Group/O2Physics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
83 lines (66 loc) · 2.51 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright 2019-2020 CERN and copyright holders of ALICE O2.
# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
# All rights not expressly granted are reserved.
#
# This software is distributed under the terms of the GNU General Public
# License v3 (GPL Version 3), copied verbatim in the file "COPYING".
#
# In applying this license 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.
cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
project(O2Physics
VERSION 0.0.1
LANGUAGES CXX
DESCRIPTION "Physics Analysis for O2")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set_property(GLOBAL PROPERTY REPORT_UNDEFINED_PROPERTIES)
include(GNUInstallDirs)
cmake_host_system_information(RESULT _totalmem QUERY TOTAL_PHYSICAL_MEMORY)
math(EXPR _total_analysis_jobs "(${_totalmem}-4096)/4096")
if(_total_analysis_jobs LESS_EQUAL 0)
set(_total_analysis_jobs 1)
endif()
set(ANALYSIS_COMPILE_POOL ${_total_analysis_jobs} CACHE STRING "How many parallel analysis compilation jobs")
set_property(GLOBAL PROPERTY JOB_POOLS analysis=${ANALYSIS_COMPILE_POOL})
message(STATUS "Limiting workflow compilations in parallel to: ${ANALYSIS_COMPILE_POOL}")
# C++ standard
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
endif()
# Dependencies
find_package(O2 CONFIG REQUIRED)
find_package(ONNXRuntime::ONNXRuntime CONFIG)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
include(O2PhysicsDefineOptions)
o2physics_define_options()
include(O2PhysicsDefineOutputPaths)
o2physics_define_output_paths()
include(O2PhysicsDefineRPATH)
o2physics_define_rpath()
# External dependencies
include(dependencies/CMakeLists.txt)
# Include macros
include(O2PhysicsNameTarget)
include(O2PhysicsAddExecutable)
include(O2PhysicsAddWorkflow)
include(O2PhysicsAddLibrary)
include(O2PhysicsAddHeaderOnlyLibrary)
include(O2PhysicsTargetRootDictionary)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
# Main targets of the project in various subdirectories. Order matters.
add_subdirectory(Common)
add_subdirectory(ALICE3)
add_subdirectory(DPG)
add_subdirectory(PWGCF)
add_subdirectory(PWGDQ)
add_subdirectory(PWGEM)
add_subdirectory(PWGHF)
add_subdirectory(PWGJE)
add_subdirectory(PWGLF)
add_subdirectory(PWGMM)
add_subdirectory(PWGUD)
add_subdirectory(Tools)
add_subdirectory(Tutorials)
add_subdirectory(EventFiltering)