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/boost/libs/test/build | |
parent | Initial commit. (diff) | |
download | ceph-6d07fdb6bb33b1af39833b850bb6cf8af79fe293.tar.xz ceph-6d07fdb6bb33b1af39833b850bb6cf8af79fe293.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/boost/libs/test/build')
-rw-r--r-- | src/boost/libs/test/build/CMakeLists.txt | 131 | ||||
-rw-r--r-- | src/boost/libs/test/build/Jamfile.v2 | 119 |
2 files changed, 250 insertions, 0 deletions
diff --git a/src/boost/libs/test/build/CMakeLists.txt b/src/boost/libs/test/build/CMakeLists.txt new file mode 100644 index 000000000..4b441836e --- /dev/null +++ b/src/boost/libs/test/build/CMakeLists.txt @@ -0,0 +1,131 @@ +# Copyright 2014, Raffi Enficiaud + +# Use, modification, and distribution are subject to 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) +# +# See http://www.boost.org/libs/test for the library home page. + +cmake_minimum_required(VERSION 2.8.11) +project(BoostTest) + +set_property(GLOBAL PROPERTY USE_FOLDERS ON) +set(CMAKE_MACOSX_RPATH ON) + +add_definitions(-DBOOST_TEST_NO_LIB) + +# build type, by default to release (with optimisations) +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to 'Release' as none was specified.") + set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + +if(NOT WITHOUT_TESTS) + # ctest sets BUILD_TESTING automatically, but does not seem to serve its purpose. + include(CTest) + enable_testing() +endif() + + +include(CheckCXXCompilerFlag) +include(CheckIncludeFileCXX) + +if(NOT MSVC) + # c++11 options + check_cxx_compiler_flag(-std=c++11 HAS_CXX11_FLAG) + check_cxx_compiler_flag(-std=c++0x HAS_CXX0X_FLAG) + if(HAS_CXX11_FLAG) + message(STATUS "Compiling with C++11 support") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + elseif(HAS_CXX0X_FLAG) + #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") + endif() +endif() + +if(MSVC) + add_definitions(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS) + set(MSVC_Additional_flags "/fp:fast /GF /Oy /GT /Ox /Ob2 /Oi /Os") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MSVC_Additional_flags}") +endif() + + +# global path +set(BOOST_TEST_ROOT_DIR ${BoostTest_SOURCE_DIR}/..) +set(BOOST_ROOT_DIR ${BOOST_TEST_ROOT_DIR}/../..) +get_filename_component(BOOST_TEST_ROOT_DIR_ABS ${BoostTest_SOURCE_DIR}/.. ABSOLUTE) +get_filename_component(BOOST_ROOT_DIR_ABS ${BOOST_ROOT_DIR} ABSOLUTE) + +# include globs +file(GLOB_RECURSE + BOOST_UTF_HEADERS + ${BOOST_TEST_ROOT_DIR}/include/*.hpp + ${BOOST_TEST_ROOT_DIR}/include/*.ipp) + +# organize files +foreach(_h IN LISTS BOOST_UTF_HEADERS) + get_filename_component(_hh ${_h} ABSOLUTE) + file(RELATIVE_PATH _v ${BOOST_TEST_ROOT_DIR_ABS}/include/boost/test ${_hh}) + get_filename_component(_v "${_v}" DIRECTORY) + string(REPLACE "/" "\\" _v "${_v}") + source_group(${_v} FILES ${_h}) +endforeach() + +set(BOOST_UTF_SRC + ${BOOST_TEST_ROOT_DIR}/src/compiler_log_formatter.cpp + + ${BOOST_TEST_ROOT_DIR}/src/debug.cpp + ${BOOST_TEST_ROOT_DIR}/src/decorator.cpp + ${BOOST_TEST_ROOT_DIR}/src/execution_monitor.cpp + ${BOOST_TEST_ROOT_DIR}/src/framework.cpp + ${BOOST_TEST_ROOT_DIR}/src/junit_log_formatter.cpp + ${BOOST_TEST_ROOT_DIR}/src/plain_report_formatter.cpp + ${BOOST_TEST_ROOT_DIR}/src/progress_monitor.cpp + ${BOOST_TEST_ROOT_DIR}/src/results_collector.cpp + ${BOOST_TEST_ROOT_DIR}/src/results_reporter.cpp + ${BOOST_TEST_ROOT_DIR}/src/test_framework_init_observer.cpp + ${BOOST_TEST_ROOT_DIR}/src/test_tools.cpp + ${BOOST_TEST_ROOT_DIR}/src/test_tree.cpp + ${BOOST_TEST_ROOT_DIR}/src/unit_test_log.cpp + ${BOOST_TEST_ROOT_DIR}/src/unit_test_main.cpp + ${BOOST_TEST_ROOT_DIR}/src/unit_test_monitor.cpp + ${BOOST_TEST_ROOT_DIR}/src/unit_test_parameters.cpp + ${BOOST_TEST_ROOT_DIR}/src/xml_log_formatter.cpp + ${BOOST_TEST_ROOT_DIR}/src/xml_report_formatter.cpp +) + +add_library(boost_test_framework + STATIC + ${BOOST_UTF_HEADERS} + ${BOOST_UTF_SRC}) +#target_compile_definitions(boost_test_framework PUBLIC "-DBOOST_TEST_DYN_LINK=0") +target_include_directories(boost_test_framework + PUBLIC + ${BOOST_TEST_ROOT_DIR}/include/ + ${BOOST_ROOT_DIR_ABS}/) +set_target_properties(boost_test_framework PROPERTIES FOLDER "UTF") + +add_library(boost_test_framework_shared + SHARED + ${BOOST_UTF_HEADERS} + ${BOOST_UTF_SRC}) +target_compile_definitions(boost_test_framework_shared PUBLIC "-DBOOST_TEST_DYN_LINK=1") +target_include_directories(boost_test_framework_shared + PUBLIC + ${BOOST_TEST_ROOT_DIR}/include/ + ${BOOST_ROOT_DIR_ABS}/) +set_target_properties(boost_test_framework_shared PROPERTIES FOLDER "UTF") + +#### +# Documentation files (files only, no target) +file(GLOB_RECURSE + BOOST_UTF_DOC_FILES + ${BOOST_TEST_ROOT_DIR}/doc/*.qbk) +add_custom_target( + quickbook + SOURCES ${BOOST_UTF_DOC_FILES}) +set_property(TARGET quickbook PROPERTY FOLDER "Documentation/") + +# Unit tests +add_subdirectory(${BOOST_TEST_ROOT_DIR}/test tmp_folders_tests) diff --git a/src/boost/libs/test/build/Jamfile.v2 b/src/boost/libs/test/build/Jamfile.v2 new file mode 100644 index 000000000..c4fa6e0c6 --- /dev/null +++ b/src/boost/libs/test/build/Jamfile.v2 @@ -0,0 +1,119 @@ +# (C) Copyright boost 2004-2014. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt) +# +# See http://www.boost.org/libs/test for the library home page. + +import os ; + +import ../../predef/check/predef + : check + : predef-check ; + +project boost/test + : source-location ../src + : requirements <link>shared:<define>BOOST_TEST_DYN_LINK=1 + <toolset>borland:<cxxflags>-w-8080 + <target-os>cygwin:<define>_POSIX_C_SOURCE=200112L + # Disable Warning about boost::noncopyable not being exported + <link>shared,<toolset>msvc:<cxxflags>-wd4275 + <toolset>msvc:<cxxflags>-wd4671 + <toolset>msvc:<cxxflags>-wd4673 + [ predef-check "BOOST_COMP_GNUC >= 4.3.0" : : <cxxflags>-Wno-variadic-macros ] + <toolset>clang:<cxxflags>-Wno-c99-extensions + <toolset>clang:<cxxflags>-Wno-variadic-macros + <warnings>all + # <warnings-as-errors>on + + : usage-requirements + <define>BOOST_TEST_NO_AUTO_LINK=1 + # Disable Warning about boost::noncopyable not being exported + <link>shared,<toolset>msvc:<cxxflags>-wd4275 + ; + +PRG_EXEC_MON_SOURCES = + execution_monitor + debug + cpp_main + ; + +TEST_EXEC_MON_SOURCES = + compiler_log_formatter + debug + decorator + execution_monitor + framework + plain_report_formatter + progress_monitor + results_collector + results_reporter + test_framework_init_observer + test_main + test_tools + test_tree + unit_test_log + unit_test_main + unit_test_monitor + unit_test_parameters + junit_log_formatter + xml_log_formatter + xml_report_formatter + ; + +UTF_SOURCES = + compiler_log_formatter + debug + decorator + execution_monitor + framework + plain_report_formatter + progress_monitor + results_collector + results_reporter + test_framework_init_observer + test_tools + test_tree + unit_test_log + unit_test_main + unit_test_monitor + unit_test_parameters + junit_log_formatter + xml_log_formatter + xml_report_formatter + ; + +lib boost_prg_exec_monitor + : # sources + $(PRG_EXEC_MON_SOURCES).cpp + : # requirements + : # default build + : # usage-requirements + <link>shared:<define>BOOST_TEST_DYN_LINK=1 + ; + +lib boost_test_exec_monitor + : # sources + $(TEST_EXEC_MON_SOURCES).cpp + : # requirements + <link>static + : # default build + : # usage-requirements + <link>shared:<define>BOOST_TEST_DYN_LINK=1 + ; + +lib boost_unit_test_framework + : # sources + $(UTF_SOURCES).cpp + : # requirements + : # default build + : # usage-requirements + <link>shared:<define>BOOST_TEST_DYN_LINK=1 + ; + +alias minimal ; + +alias included ; + +boost-install boost_prg_exec_monitor + boost_test_exec_monitor + boost_unit_test_framework ; |