forked from tomopy/tomopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (43 loc) · 1.73 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
# need CUDA as a first-class language; use newer FindCUDAToolkit
cmake_minimum_required(VERSION 3.17 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()
if(SKBUILD)
message("Using scikit-build. cmake: ${CMAKE_COMMAND}...")
else()
message("Using cmake: ${CMAKE_COMMAND}...")
endif()
################################################################################
#
# CMake settings
#
################################################################################
cmake_policy(SET CMP0048 NEW)
cmake_policy(SET CMP0042 NEW)
cmake_policy(SET CMP0053 NEW)
cmake_policy(SET CMP0104 OLD) # ignore CMAKE_CUDA_ARCHITECTURES
project(tomopy LANGUAGES C CXX)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/Modules ${CMAKE_MODULE_PATH})
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME python)
################################################################################
include(MacroUtilities)
include(Compilers)
include(Options)
include(GNUInstallDirs)
include(ProjectSettings)
include(BuildSettings)
include(Packages)
include(ClangFormat)
################################################################################
# tomopy source
################################################################################
add_subdirectory(source)
################################################################################
# Information
################################################################################
print_features()