summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/assert/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/boost/libs/assert/CMakeLists.txt
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/assert/CMakeLists.txt')
-rw-r--r--src/boost/libs/assert/CMakeLists.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/boost/libs/assert/CMakeLists.txt b/src/boost/libs/assert/CMakeLists.txt
new file mode 100644
index 00000000..2bfc1fc0
--- /dev/null
+++ b/src/boost/libs/assert/CMakeLists.txt
@@ -0,0 +1,54 @@
+# Copyright 2018 Mike Dev
+# Copyright 2018 Peter Dimov
+# Distributed under the Boost Software License, Version 1.0.
+# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
+
+# Partial (add_subdirectory only) and experimental CMake support
+# Subject to change; please do not rely on the contents of this file yet
+
+cmake_minimum_required(VERSION 3.5)
+
+project(BoostAssert VERSION 1.72.0 LANGUAGES CXX)
+
+add_library(boost_assert INTERFACE)
+add_library(Boost::assert ALIAS boost_assert)
+
+target_include_directories(boost_assert INTERFACE include)
+
+target_link_libraries(boost_assert
+ INTERFACE
+ Boost::config
+)
+
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+
+ # `function` confuses FetchContent, sees empty CMAKE_CURRENT_LIST_DIR
+ macro(fetch_and_include name)
+
+ message(STATUS "Fetching ${name}")
+
+ file(DOWNLOAD
+ "https://raw.githubusercontent.com/pdimov/mincmake/master/${name}"
+ "${CMAKE_BINARY_DIR}/fetch_and_include/${name}"
+ )
+
+ include("${CMAKE_BINARY_DIR}/fetch_and_include/${name}")
+
+ endmacro()
+
+ fetch_and_include(cmake/boost_fetch.cmake)
+ fetch_and_include(cmake/boost_test.cmake)
+
+ boost_fetch(boostorg/config TAG develop)
+ boost_fetch(boostorg/core TAG develop)
+
+ enable_testing()
+ add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
+
+endif()
+
+if(COMMAND boost_test)
+
+ add_subdirectory(test)
+
+endif()