[DEV] add v1.66.0

This commit is contained in:
2018-01-12 21:47:58 +01:00
parent 87059bb1af
commit a97e9ae7d4
49032 changed files with 7668950 additions and 0 deletions

View File

@@ -0,0 +1,203 @@
# 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)
# global include on boost
include_directories(${BOOST_ROOT_DIR_ABS}/)
# 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/)
set_target_properties(boost_test_framework 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
# documentation tests
file(GLOB_RECURSE
BOOST_UTF_DOC_EXAMPLES
${BOOST_TEST_ROOT_DIR}/doc/examples/*.cpp)
foreach(_h IN LISTS BOOST_UTF_DOC_EXAMPLES)
get_filename_component(_hh ${_h} NAME_WE)
add_executable(doc-${_hh} ${_h} ${BOOST_TEST_ROOT_DIR}/doc/examples/${_hh}.output)
target_include_directories(doc-${_hh} PUBLIC ${BOOST_TEST_ROOT_DIR}/include/)
set_target_properties(doc-${_hh} PROPERTIES FOLDER "Doc examples")
add_test(NAME doc-${_hh}-test
COMMAND doc-${_hh})
get_filename_component(_ext ${_h} EXT)
string(FIND ${_ext} "fail" _index_fail)
if(${_index_fail} GREATER -1)
message(STATUS "test ${_hh}.${_ext} = ${_index_fail}")
set_tests_properties(doc-${_hh}-test PROPERTIES WILL_FAIL TRUE)
endif()
endforeach()
# unit tests folder
set(BOOST_TEST_UNITTESTS_FOLDER ${BOOST_TEST_ROOT_DIR}/test)
# datasets
file(GLOB
BOOST_TEST_UNITTESTS_DATASET
${BOOST_TEST_UNITTESTS_FOLDER}/test-organization-ts/datasets-test/*.cpp
${BOOST_TEST_UNITTESTS_FOLDER}/test-organization-ts/datasets-test/*.hpp)
add_executable(boost_test_datasets ${BOOST_TEST_UNITTESTS_DATASET})
target_include_directories(boost_test_datasets PUBLIC ${BOOST_TEST_ROOT_DIR}/include/)
target_link_libraries(boost_test_datasets boost_test_framework)
target_compile_definitions(boost_test_datasets PUBLIC "BOOST_TEST_DYN_LINK=1")
set_target_properties(boost_test_datasets PROPERTIES FOLDER "Unit tests")
add_test(NAME bt-unittest-dataset
COMMAND boost_test_datasets)
####
# TS writing-test-ts
set(BOOST_UTF_TESTS_IND_FILES
writing-test-ts
execution_monitor-ts
framework-ts
usage-variants-ts
utils-ts
test-organization-ts
smoke-ts
)
foreach(_ts IN LISTS BOOST_UTF_TESTS_IND_FILES)
message("parsing test suite ${_ts}")
file(GLOB
_boost_utf_current_tsuite
${BOOST_TEST_UNITTESTS_FOLDER}/${_ts}/*.cpp)
foreach(_h IN LISTS _boost_utf_current_tsuite)
get_filename_component(_hh ${_h} ABSOLUTE)
get_filename_component(_name ${_h} NAME_WE)
file(RELATIVE_PATH _v ${BOOST_TEST_UNITTESTS_FOLDER} ${_hh})
#get_filename_component(_v "${_v}" DIRECTORY)
message("adding ${_ts}/${_name}")
add_executable(${_name} ${_hh})
target_link_libraries(${_name} PRIVATE boost_test_framework)
set_target_properties(${_name} PROPERTIES FOLDER "Unit tests/${_ts}")
add_test(NAME bt-unittest-${_name}
COMMAND ${_name})
endforeach()
unset(_boost_utf_current_tsuite)
endforeach() # test suite

119
libs/test/build/Jamfile.v2 Normal file
View File

@@ -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.
project boost/test
: source-location ../src
: requirements <link>shared:<define>BOOST_TEST_DYN_LINK=1
<toolset>borland:<cxxflags>-w-8080
# Disable Warning about boost::noncopyable not being exported
<link>shared,<toolset>msvc:<cxxflags>-wd4275
<toolset>msvc:<cxxflags>-wd4671
<toolset>msvc:<cxxflags>-wd4673
<toolset>gcc:<cxxflags>-Wno-variadic-macros
<toolset>clang:<cxxflags>-Wno-c99-extensions
<toolset>clang:<cxxflags>-Wno-variadic-macros
<warnings>all
# <warnings-as-errors>on
# adding a dependency on boost/timer as the header are needed, and the junction needs
# to be there in order to build the library.
<library>/boost/timer//boost_timer
: usage-requirements
<define>BOOST_TEST_NO_AUTO_LINK=1
# Disable Warning about boost::noncopyable not being exported
<link>shared,<toolset>msvc:<cxxflags>-wd4275
# Adding a dependency on boost/timer as the headers need to be there in case of the
# header-only usage variant
<use>/boost/timer//boost_timer
;
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 ;