diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/spawn/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/spawn/CMakeLists.txt')
-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() |