-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
69 lines (55 loc) · 1.87 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
########################################################
# cmake file for building MarlinMT
# @author Remi Ete, DESY
cmake_minimum_required( VERSION 3.14 FATAL_ERROR )
########################################################
#--- Project name
project( MarlinMT
VERSION 0.1.0
DESCRIPTION "Modular Analysis and Reconstruction for LINear collider (Multi-Threaded)"
LANGUAGES CXX
)
#--- Load cmake config
list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
include( MarlinMTBuild )
marlinmt_set_cxx_standard()
#--- Sources to compile
add_subdirectory( source )
#--- Unit tests
include( CTest )
if( BUILD_TESTING )
add_subdirectory( test )
endif()
#-- Benchmarking
if ( MARLINMT_BUILD_BENCHMARKS )
add_subdirectory( benchmarking )
endif()
#--- Documentation
add_subdirectory( doc )
#--- Generate and install thismarlinmt.sh
marlinmt_generate_thismarlinmt()
#--- Display summary and write variables to cache
marlinmt_cmake_summary()
#--- Generate configuration files
# See: https://cmake.org/cmake/help/v3.14/module/CMakePackageConfigHelpers.html
include( CMakePackageConfigHelpers )
configure_package_config_file(
${PROJECT_SOURCE_DIR}/cmake/MarlinMTConfig.cmake.in ${PROJECT_BINARY_DIR}/MarlinMTConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}-${PROJECT_VERSION}
PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR
)
write_basic_package_version_file(
MarlinMTConfigVersion.cmake
COMPATIBILITY AnyNewerVersion
)
#--- Install configuration files
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/MarlinMTConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/MarlinMTConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}-${PROJECT_VERSION}
)
#--- Generate targets file
install( EXPORT MarlinMT
FILE MarlinMTConfig-targets.cmake
NAMESPACE MarlinMT::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}-${PROJECT_VERSION}
)