forked from NVIDIA/cccl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
49 lines (40 loc) · 1.31 KB
/
CMakeLists.txt
File metadata and controls
49 lines (40 loc) · 1.31 KB
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
if (NOT CCCL_ENABLE_LIBCUDACXX)
include(cmake/libcudacxxAddSubdir.cmake)
return()
endif()
cmake_minimum_required(VERSION 3.21)
set(PACKAGE_NAME libcudacxx)
set(PACKAGE_VERSION 11.0)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
project(libcudacxx LANGUAGES CXX)
# Add codegen module
option(
libcudacxx_ENABLE_CODEGEN
"Enable libcudacxx's atomics backend codegen and tests."
OFF
)
if (libcudacxx_ENABLE_CODEGEN)
add_subdirectory(codegen)
endif()
set(CMAKE_MODULE_PATH "${libcudacxx_SOURCE_DIR}/cmake")
set(LLVM_PATH "${libcudacxx_SOURCE_DIR}" CACHE STRING "" FORCE)
# Configuration options.
option(LIBCUDACXX_ENABLE_CUDA "Enable the CUDA language support." ON)
if (LIBCUDACXX_ENABLE_CUDA)
enable_language(CUDA)
endif()
option(LIBCUDACXX_ENABLE_LIBCUDACXX_TESTS "Enable libcu++ tests." ON)
if (LIBCUDACXX_ENABLE_LIBCUDACXX_TESTS)
enable_testing()
# Create the compiler targets with the common compile flags
include(cmake/LibcudacxxBuildCompilerTargets.cmake)
libcudacxx_build_compiler_targets()
# Test all public and internal headers
include(cmake/LibcudacxxInternalHeaderTesting.cmake)
include(cmake/LibcudacxxPublicHeaderTesting.cmake)
include(cmake/LibcudacxxPublicHeaderTestingHost.cmake)
add_subdirectory(test)
endif()
if (CCCL_ENABLE_BENCHMARKS)
add_subdirectory(benchmarks)
endif()