mirror of
https://github.com/boostorg/nowide.git
synced 2026-01-19 04:22:12 +00:00
66 lines
3.4 KiB
Plaintext
66 lines
3.4 KiB
Plaintext
# 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
|
|
[ 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 <use>/boost/nowide//boost_nowide ;
|
|
explicit file_test_helpers ;
|
|
|
|
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 ] ;
|