-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (56 loc) · 1.66 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
cmake_minimum_required(VERSION 3.20)
project(
cusan
VERSION 0.1.0
DESCRIPTION "A data race detector for CUDA based on ThreadSanitizer"
HOMEPAGE_URL "https://github.com/ahueck/cusan"
LANGUAGES CXX C
)
set(CMAKE_VERBOSE_MAKEFILE ON)
list(
APPEND
CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/cmake
)
include(cusanToolchain)
cusan_target_format(
format-cusan-sources "Formats project source files"
TARGETS lib/pass/*.cpp
lib/pass/*.h
)
add_subdirectory(externals)
add_subdirectory(lib)
add_subdirectory(scripts)
if(PROJECT_IS_TOP_LEVEL)
enable_testing()
add_subdirectory(test)
endif()
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/cusanConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMinorVersion
)
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
set(LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
set(BINARY_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
set(CMAKE_INSTALL_DIR ${CUSAN_INSTALL_CONFIGDIR})
configure_package_config_file(
${PROJECT_SOURCE_DIR}/cmake/cusanConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cusanConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_DIR}
PATH_VARS INCLUDE_INSTALL_DIR
LIBRARY_INSTALL_DIR
BINARY_INSTALL_DIR
CMAKE_INSTALL_DIR
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cusanConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/cusanConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_DIR}
)
if(PROJECT_IS_TOP_LEVEL)
feature_summary(WHAT ENABLED_FEATURES PACKAGES_FOUND PACKAGES_NOT_FOUND
DESCRIPTION "cusan ${PROJECT_VERSION} package and feature info:"
INCLUDE_QUIET_PACKAGES
QUIET_ON_EMPTY
)
endif()