Jamfile.v2
3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright (c) 2003, 2006 Beman Dawes
# Copyright (c) 2012 Artyom Beilis (Tonkikh)
# Copyright (c) 2020-2022 Alexander Grund
#
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
import testing ;
import config : requires ;
rule require-windows ( properties * )
{
local result ;
if ! <target-os>windows in $(properties)
{
result = <build>no ;
}
return $(result) ;
}
project : requirements
<library>/boost/nowide//boost_nowide
<include>.
<warnings>pedantic
<warnings-as-errors>on
[ requires
cxx11_defaulted_functions
cxx11_noexcept
cxx11_rvalue_references
cxx11_static_assert
]
[ check-target-builds ../config//cxx11_moveable_fstreams "std::fstream is moveable and swappable" : : <build>no ]
;
lib shell32 ;
lib file_test_helpers : file_test_helpers.cpp : <link>static -<library>/boost/nowide//boost_nowide ;
run test_codecvt.cpp ;
run test_convert.cpp ;
run test_env.cpp ;
run test_env.cpp : : : <define>BOOST_NOWIDE_TEST_INCLUDE_WINDOWS=1 : test_env_win ;
run test_fs.cpp : : : <library>/boost/filesystem//boost_filesystem/<warnings-as-errors>off ;
run test_filebuf.cpp file_test_helpers ;
run test_filebuf.cpp file_test_helpers : : : <define>BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT=1 <target-os>windows:<build>no : test_filebuf_internal ;
run test_ifstream.cpp file_test_helpers ;
run test_ifstream.cpp file_test_helpers : : : <define>BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT=1 <target-os>windows:<build>no : test_ifstream_internal ;
run test_ofstream.cpp file_test_helpers ;
run test_ofstream.cpp file_test_helpers : : : <define>BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT=1 <target-os>windows:<build>no : test_ofstream_internal ;
run test_fstream.cpp file_test_helpers ;
run test_fstream.cpp file_test_helpers : : : <define>BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT=1 <target-os>windows:<build>no : test_fstream_internal ;
run test_fstream_special.cpp file_test_helpers ;
run test_fstream_special.cpp file_test_helpers : : : <define>BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT=1 <target-os>windows:<build>no : test_fstream_special_internal ;
run test_iostream.cpp file_test_helpers : : : <target-os>windows:<find-static-library>user32 ;
if [ MATCH (--nowide-enable-cmake) : [ modules.peek : ARGV ] ]
{
# Use CMake as a cross-platform scripting language for this test
path-constant CMakeScript : test_iostream_passthrough.cmake ;
run test_iostream.cpp file_test_helpers : : : <define>BOOST_NOWIDE_TEST_INTERACTIVE=1 <testing.launcher>"cmake -P $(CMakeScript)" : test_iostream_passthrough ;
}
run test_stackstring.cpp ;
run test_stat.cpp ;
run test_stdio.cpp ;
run test_system.cpp : : : <define>BOOST_NOWIDE_TEST_USE_NARROW=1 <target-os>windows:<library>shell32 <target-os>darwin,<link>shared:<build>no : test_system_n ;
run test_system.cpp : : : <define>BOOST_NOWIDE_TEST_USE_NARROW=0 <library>shell32 <conditional>@require-windows : test_system_w ;
run test_system.cpp : : : <define>BOOST_NOWIDE_TEST_USE_NARROW=0 <define>BOOST_USE_WINDOWS_H <library>shell32 <conditional>@require-windows : test_system_use_windows_h ;
run test_system.cpp : : : <define>BOOST_NOWIDE_TEST_USE_NARROW=0 <define>BOOST_USE_WINDOWS_H <define>WIN32_LEAN_AND_MEAN <library>shell32 <conditional>@require-windows : test_system_use_windows_h_lean ;
run test_traits.cpp : : : <define>BOOST_NOWIDE_TEST_BFS_PATH <library>/boost/filesystem//boost_filesystem/<warnings-as-errors>off ;
compile benchmark_fstream.cpp : <define>BOOST_NOWIDE_USE_WIN_FSTREAM=1 [ requires cxx11_hdr_chrono ] ;