-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
51 lines (30 loc) · 1.19 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
# Generated by `boostdep --cmake crypt`
# Copyright 2020, 2021 Peter Dimov
# Copyright 2023 Matt Borland
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.24)
project(boost_crypt VERSION 1.0.0 LANGUAGES CXX)
option(BOOST_CRYPT_ENABLE_CUDA "Build with CUDA" OFF)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(BOOST_CRYPT_ENABLE_CUDA)
enable_language(CUDA)
set(CMAKE_CUDA_STANDARD 20)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_EXTENSIONS OFF)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-relaxed-constexpr")
find_package(CUDAToolkit REQUIRED)
endif()
add_library(boost_crypt INTERFACE)
add_library(Boost::crypt ALIAS boost_crypt)
target_include_directories(boost_crypt INTERFACE include)
target_compile_features(boost_crypt INTERFACE cxx_std_20)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
include(GNUInstallDirs)
install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
endif()