From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/spawn/CMakeLists.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/spawn/CMakeLists.txt (limited to 'src/spawn/CMakeLists.txt') 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() -- cgit v1.2.3