diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/spawn/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | ceph-upstream/18.2.2.tar.xz ceph-upstream/18.2.2.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/spawn/CMakeLists.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/spawn/CMakeLists.txt b/src/spawn/CMakeLists.txt new file mode 100644 index 000000000..265bf2dde --- /dev/null +++ b/src/spawn/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required (VERSION 3.5.1) +project(spawn) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# requires boost 1.66, but may be provided by a parent project +if(NOT Boost_FOUND OR NOT Boost_system_FOUND OR NOT Boost_context_FOUND OR Boost_VERSION VERSION_LESS 1.66.0) + find_package(Boost 1.66 REQUIRED COMPONENTS system context) +endif() + +add_library(spawn INTERFACE) +target_include_directories(spawn INTERFACE include) +target_link_libraries(spawn INTERFACE Boost::system Boost::context) + +option(SPAWN_INSTALL "install spawn headers" ON) +if(SPAWN_INSTALL) + install(DIRECTORY include/spawn DESTINATION include) +endif() + +option(SPAWN_TEST_ADDRESS_SANITIZER "build spawn tests with address sanitizer" ON) + +option(SPAWN_BUILD_TESTS "build spawn tests" ON) +if(SPAWN_BUILD_TESTS) + enable_testing() + add_subdirectory(test) +endif() |