This repository has been archived by the owner on Dec 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
60 lines (44 loc) · 1.84 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
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
set(MSG "")
message(STATUS "Warning! Building from the source directory is not recommended")
message(STATUS "If unintented, please remove 'CMakeCache.txt' and 'CMakeFiles'")
message(STATUS "and build from a separate directory")
message(WARNING "In-source build")
endif()
################################################################################
message("Using cmake: ${CMAKE_COMMAND}...")
file(READ "VERSION" VERSION_STRING LIMIT_COUNT 1)
string(REGEX REPLACE "[A-Za-z\n\r].*" "" VERSION_STRING "${VERSION_STRING}")
################################################################################
cmake_policy(SET CMP0048 NEW)
cmake_policy(SET CMP0042 NEW)
cmake_policy(SET CMP0053 NEW)
include(cmake/Modules/CaptureCommandLine.cmake)
project(GeantExascalePilot LANGUAGES C CXX CUDA VERSION ${VERSION_STRING})
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/Modules ${CMAKE_MODULE_PATH})
set(CMAKE_DIRECTORY_LABELS "GeantExascalePilot")
################################################################################
include(MacroUtilities)
include(Compilers)
include(Options)
include(GNUInstallDirs)
include(ProjectSettings)
include(BuildSettings)
include(Packages)
include(ClangFormat)
# include(Documentation)
################################################################################
# source
################################################################################
add_subdirectory(testing)
if(GEANT_BUILD_TESTS)
include(CTest)
enable_testing()
endif()
add_subdirectory(source)
add_subdirectory(examples)
################################################################################
# Information
################################################################################
print_features()