summaryrefslogtreecommitdiffstats
path: root/src/boost/tools/boost_install/test/test
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/tools/boost_install/test/test
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/tools/boost_install/test/test')
-rw-r--r--src/boost/tools/boost_install/test/test/CMakeLists.txt42
-rw-r--r--src/boost/tools/boost_install/test/test/test_mon.cpp14
-rw-r--r--src/boost/tools/boost_install/test/test/test_utf.cpp16
3 files changed, 72 insertions, 0 deletions
diff --git a/src/boost/tools/boost_install/test/test/CMakeLists.txt b/src/boost/tools/boost_install/test/test/CMakeLists.txt
new file mode 100644
index 00000000..50769d5b
--- /dev/null
+++ b/src/boost/tools/boost_install/test/test/CMakeLists.txt
@@ -0,0 +1,42 @@
+# Copyright 2018, 2019 Peter Dimov
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
+
+cmake_minimum_required(VERSION 3.5)
+
+if(POLICY CMP0074)
+ cmake_policy(SET CMP0074 NEW)
+endif()
+
+project(CmakeConfigTestTest LANGUAGES CXX)
+
+include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake)
+
+set(BOOST_HINTS)
+
+if(USE_STAGED_BOOST)
+ set(BOOST_HINTS HINTS ../../../../stage)
+endif()
+
+if(USE_BOOST_PACKAGE)
+
+ find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS prg_exec_monitor unit_test_framework ${BOOST_HINTS})
+
+else()
+
+ find_package(boost_prg_exec_monitor ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS})
+ find_package(boost_unit_test_framework ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS})
+
+endif()
+
+add_executable(test_mon test_mon.cpp)
+target_link_libraries(test_mon Boost::prg_exec_monitor)
+
+add_executable(test_utf test_utf.cpp)
+target_link_libraries(test_utf Boost::unit_test_framework)
+
+enable_testing()
+add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
+
+add_test(test_mon test_mon)
+add_test(test_utf test_utf)
diff --git a/src/boost/tools/boost_install/test/test/test_mon.cpp b/src/boost/tools/boost_install/test/test/test_mon.cpp
new file mode 100644
index 00000000..5aabdc90
--- /dev/null
+++ b/src/boost/tools/boost_install/test/test/test_mon.cpp
@@ -0,0 +1,14 @@
+
+// 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
+
+#include <boost/test/prg_exec_monitor.hpp>
+
+int cpp_main( int, char*[] )
+{
+ return 0;
+}
diff --git a/src/boost/tools/boost_install/test/test/test_utf.cpp b/src/boost/tools/boost_install/test/test/test_utf.cpp
new file mode 100644
index 00000000..0dc6a986
--- /dev/null
+++ b/src/boost/tools/boost_install/test/test/test_utf.cpp
@@ -0,0 +1,16 @@
+
+// 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
+
+#define BOOST_TEST_MODULE main
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( t1 )
+{
+ int i = 0;
+ BOOST_TEST( i == 0 );
+}