-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
77 lines (60 loc) · 1.7 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
cmake_minimum_required(VERSION 3.8)
cmake_policy(SET CMP0074 NEW) # use package_ROOT env var to find packages
# Location of the cupla
set(cupla_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cupla CACHE PATH "Path to CUPLA (by default: submodule)")
project(
CLUE
VERSION 1.0
DESCRIPTION "The CLUstering by Energy algorithm"
LANGUAGES CXX)
# Check for CUDA
include(CheckLanguage)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER)
enable_language(CUDA)
else()
message(STATUS "No CUDA compiler found. Still, you can run the C++ version!")
endif()
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/install" CACHE PATH "default install path" FORCE )
endif()
if(CMAKE_CUDA_COMPILER)
message(STATUS "Set up CUDA")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CUDA_ARCHITECTURES "60;70;75")
endif()
include(GNUInstallDirs)
# Set up C++ Standard
set(CMAKE_CXX_STANDARD 17 CACHE STRING "")
if(NOT CMAKE_CXX_STANDARD MATCHES "17|20")
message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}")
endif()
find_package(Boost REQUIRED)
if(Boost_FOUND)
message(STATUS "Boost package found!")
endif()
find_package(TBB REQUIRED)
if(TBB_FOUND)
message(STATUS "TBB package found!")
endif()
find_package(EDM4HEP)
if(EDM4HEP_FOUND)
message(STATUS "EDM4HEP package found!")
endif()
find_package(DD4hep)
if(DD4HEP_FOUND)
message(STATUS "DD4HEP package found!")
endif()
find_package(k4FWCore REQUIRED)
if(k4FWCore_FOUND)
message(STATUS "k4FWCore package found!")
endif()
find_package(Gaudi REQUIRED)
if(Gaudi_FOUND)
message(STATUS "Gaudi package found!")
endif()
#gaudi_install(PYTHON)
#gaudi_install(SCRIPTS)
include(CTest)
add_subdirectory(src)
message(STATUS "Finished!")