]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/log/test/Jamfile.v2
buildsys: switch source download to quincy
[ceph.git] / ceph / src / boost / libs / log / test / Jamfile.v2
CommitLineData
7c673cae
FG
1#
2# Copyright Andrey Semashev 2007 - 2015.
3# Distributed under the Boost Software License, Version 1.0.
4# (See accompanying file LICENSE_1_0.txt or copy at
5# http://www.boost.org/LICENSE_1_0.txt)
6#
7# The file was adapted from libs/tr2/test/Jamfile.v2 by John Maddock.
8
9import testing ;
10import path ;
11import regex ;
92f5a8d4
TL
12import os ;
13import ../build/log-platform-config ;
7c673cae
FG
14
15project
16 : requirements
92f5a8d4
TL
17 <conditional>@log-platform-config.set-platform-defines
18
7c673cae
FG
19 <include>common
20
21 # Disable warnings about using 'insecure' standard C functions
22 <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
23 <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
24 <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
25 <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
26 <toolset>intel-win:<define>_SCL_SECURE_NO_WARNINGS
27 <toolset>intel-win:<define>_SCL_SECURE_NO_DEPRECATE
28 <toolset>intel-win:<define>_CRT_SECURE_NO_WARNINGS
29 <toolset>intel-win:<define>_CRT_SECURE_NO_DEPRECATE
30
31 <toolset>msvc:<cxxflags>/bigobj
32 <toolset>msvc:<cxxflags>/wd4503 # decorated name length exceeded, name was truncated
33 <toolset>msvc:<cxxflags>/wd4456 # declaration of 'A' hides previous local declaration
34 <toolset>msvc:<cxxflags>/wd4459 # declaration of 'A' hides global declaration
35 <toolset>msvc:<cxxflags>/wd4003 # not enough actual parameters for macro 'X' - caused by BOOST_PP_IS_EMPTY and BOOST_PP_IS_BEGIN_PARENS which are used by Fusion
36 <toolset>msvc:<cxxflags>/wd4355 # 'this' : used in base member initializer list
37
38 # Disable Intel warnings:
39 # warning #177: function "X" was declared but never referenced
40 # warning #780: using-declaration ignored -- it refers to the current namespace
41 # warning #2196: routine is both "inline" and "noinline"
42 # remark #1782: #pragma once is obsolete. Use #ifndef guard instead.
43 # remark #193: zero used for undefined preprocessing identifier "X"
44 # remark #304: access control not specified ("public" by default)
45 # remark #981: operands are evaluated in unspecified order
46 # remark #1418: external function definition with no prior declaration
47 # Mostly comes from Boost.Phoenix: warning #411: class "X" defines no constructor to initialize the following: reference member "Y"...
48 # warning #734: "X" (declared at line N of "file.hpp"), required for copy that was eliminated, is inaccessible
49 # warning #279: controlling expression is constant
50 <toolset>intel-win:<cxxflags>"/Qwd177,780,2196,1782,193,304,981,1418,411,734,279"
51 <toolset>intel-linux:<cxxflags>"-wd177,780,2196,1782,193,304,981,1418,411,734,279"
52 <toolset>intel-darwin:<cxxflags>"-wd177,780,2196,1782,193,304,981,1418,411,734,279"
53
54 <toolset>darwin:<cxxflags>-ftemplate-depth-1024
55 <toolset>gcc:<cxxflags>-ftemplate-depth-1024
56
57 <toolset>gcc:<cxxflags>-fno-strict-aliasing # avoids strict aliasing violations in other Boost components
58
92f5a8d4
TL
59 # Boost.Interprocess does not compile on Cygwin: https://github.com/boostorg/interprocess/issues/76
60 <target-os>cygwin:<define>BOOST_LOG_WITHOUT_IPC
61
7c673cae
FG
62 <library>/boost/log//boost_log
63 <library>/boost/log//boost_log_setup
64 <library>/boost/date_time//boost_date_time
65 <library>/boost/regex//boost_regex
66 <library>/boost/filesystem//boost_filesystem
7c673cae
FG
67 <library>/boost/test//boost_unit_test_framework
68 <threading>single:<define>BOOST_LOG_NO_THREADS
69 <threading>multi:<library>/boost/thread//boost_thread
70 : default-build
71 # Testers typically don't specify threading environment and the library can be built and tested for single and multi. I'm more interested in multi though.
72 <threading>multi
73# <link>static
74 ;
75
76# this rule enumerates through all the sources and invokes
77# the run rule for each source, the result is a list of all
78# the run rules, which we can pass on to the test_suite rule:
79rule test_all
80{
92f5a8d4
TL
81 local all_rules ;
82 local file ;
83
84 if ! [ os.environ BOOST_LOG_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ]
85 {
86 local headers_path = [ path.make $(BOOST_ROOT)/libs/log/include/boost/log ] ;
87 for file in [ path.glob-tree $(headers_path) : *.hpp : detail ]
88 {
89 local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
90 # Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
91 # All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
92 local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ;
93 #ECHO $(rel_file) ;
94 all_rules += [ compile compile/self_contained_header.cpp : <define>"BOOST_LOG_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(test_name) ] ;
95 }
96 }
97
98 for file in [ glob compile/*.cpp ]
99 {
100 if [ path.basename $(file) ] != "self_contained_header.cpp"
101 {
102 all_rules += [ compile $(file) ] ;
103 }
104 }
105 for file in [ glob compile_fail/*.cpp ]
106 {
107 all_rules += [ compile-fail $(file) ] ;
108 }
109 for file in [ glob run/*.cpp ]
110 {
111 all_rules += [ run $(file) ] ;
112 }
113
114 if ! [ os.environ BOOST_LOG_TEST_WITHOUT_EXAMPLES ]
115 {
116 all_rules += [ build-project ../example ] ;
117 }
118
119 #ECHO All rules: $(all_rules) ;
120 return $(all_rules) ;
7c673cae
FG
121}
122
92f5a8d4 123test-suite log : [ test_all ] ;