-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
52 lines (43 loc) · 1.92 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
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
# ---- Project ----
project(RAYX VERSION 0.21.7)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_STANDARD 20)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
# ------------------
# ---- Options ----
option(WERROR "add -Werror option" "NO") # inactive per default
option(RAYX_ENABLE_CUDA "This option enables the search for CUDA. Project will be compiled without cuda if not found." ON)
option(RAYX_REQUIRE_CUDA "If option 'RAYX_ENABLE_CUDA' is ON, this option will add the requirement that cuda must be found." OFF)
option(RAYX_STATIC_LIB "This option builds 'rayx-core' as a static library." OFF)
# ------------------
# ---- Code Coverage ----
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/Extern/cmake)
# ------------------
# ---- CPack ----
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_DESCRIPTION "${PROJECT_NAME} - For simulating and designing beamlines at synchrotron light sources")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} - For simulating and designing beamlines at synchrotron light sources")
set(CPACK_PACKAGE_VENDOR "Helmhotz-Zentrum Berlin")
set(CPACK_PACKAGE_CONTACT "jannis.maier@helmholtz-berlin.de")
# Disable GoogleTest installation
set(INSTALL_GTEST OFF CACHE BOOL "Disable installation of GoogleTest" FORCE)
set(INSTALL_GMOCK OFF CACHE BOOL "Disable installation of GoogleMock" FORCE)
# Install directories
if(APPLE)
set(INSTALL_DATA_DIR "Library/Application Support/${PROJECT_NAME}")
set(INSTALL_FONTS_DIR "Library/Fonts/${PROJECT_NAME}")
elseif(UNIX AND NOT APPLE)
set(INSTALL_DATA_DIR "share/${PROJECT_NAME}")
set(INSTALL_FONTS_DIR "share/fonts/${PROJECT_NAME}")
elseif(WIN32)
set(INSTALL_DATA_DIR ".")
set(INSTALL_FONTS_DIR ".")
endif()
# ------------------
# ---- Subdirectories ----
add_subdirectory(Extern)
add_subdirectory(Intern)
# ------------------