2
0
mirror of https://github.com/boostorg/wave.git synced 2026-01-22 05:42:51 +00:00
Files
wave/test/build/Jamfile.v2
René Ferdinand Rivera Morell 7ce8b53d9d Add support for modular build structure. (#214)
* Make the library modular usable.

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add wave tool build to all target.

* Add missing NO_LIB usage requirements.

* Add requires-b2 check to top-level build file.

* Bump B2 require to 5.2

* Change all <source> references to <library>.

* Move inter-lib dependencies to a project variable and into the build targets.

* Update build deps.
2024-08-26 22:01:03 -07:00

283 lines
8.2 KiB
Plaintext

# Boost.Wave: A Standard compliant C++ preprocessor library
#
# Boost Wave Library Test Jamfile
#
# http://www.boost.org/
#
# Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under 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)
require-b2 5.0.1 ;
import-search /boost/config/checks ;
import config : requires ;
import project ;
import path ;
#
# These are the sources to compile for the testwave application
#
SOURCES_STATIC = testwave testwave_app
;
SOURCES_DYNAMIC = testwave_dll testwave_app_dll
;
SOURCES = $(SOURCE_STATIC) $(SOURCES_DYNAMIC)
;
path-constant TESTWAVE_DIR : ../testwave/testfiles
;
path-constant WAVE_INCLUDE_DIR : ../../include
;
path-constant SAMPLES_DIR : ../../samples
;
#
# We need the Boost Config project for the boost/version.hpp header file.
#
local boost-config-attributes
= [ project.attributes [ project.is-registered-id /boost/config ] ] ;
local BOOST_CONFIG_INCLUDE_DIR
= [ path.join [ $(boost-config-attributes).get location ] include ] ;
#
# This are the arguments for the testwave executable
#
TESTWAVE_ARGUMENTS =
-d4 # use -d4 for verbose results
--hooks=1 # test hooks as well
-S$(TESTWAVE_DIR)
-S$(WAVE_INCLUDE_DIR) -I$(WAVE_INCLUDE_DIR)
-S$(BOOST_CONFIG_INCLUDE_DIR) -I$(BOOST_CONFIG_INCLUDE_DIR)
;
#
# These are the names of the different unit tests to run
#
TESTWAVE_FILES = test.cfg
;
project
: requirements
[ requires
cxx11_constexpr
cxx11_variadic_templates
cxx11_rvalue_references
cxx11_hdr_thread
cxx11_hdr_mutex
cxx11_hdr_regex
]
<include>$(SAMPLES_DIR)
;
for local source in $(SOURCES)
{
local requirements ;
requirements += <toolset-msvc:version>7.1:<rtti>off ; # workaround for compiler bug
requirements += <toolset-msvc:version>7.1_stlport4:<rtti>off ;
requirements +=
<source>/boost/any//boost_any
<source>/boost/program_options//boost_program_options
;
obj $(source) : ../testwave/$(source).cpp : $(requirements) ;
}
#
# Wave test suite
#
test-suite wave
:
[
run
# sources
../testwave/$(SOURCES_DYNAMIC).cpp
/boost/wave//boost_wave
/boost/program_options//boost_program_options
/boost/filesystem//boost_filesystem
/boost/system//boost_system
/boost/thread//boost_thread
:
# arguments
$(TESTWAVE_ARGUMENTS)
--config-file
:
# input files
$(TESTWAVE_DIR)/$(TESTWAVE_FILES)
:
# requirements
<threading>multi
<variant>debug
<link>shared:<define>BOOST_ALL_DYN_LINK=1
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
# <define>BOOST_LIB_DIAGNOSTIC=1
:
# name
testwave_dll
]
[
run
# sources
../testwave/$(SOURCES_STATIC).cpp
/boost/wave//boost_wave/<link>static
/boost/program_options//boost_program_options/<link>static
/boost/filesystem//boost_filesystem/<link>static
/boost/system//boost_system/<link>static
/boost/thread//boost_thread/<link>static
:
# arguments
$(TESTWAVE_ARGUMENTS)
--config-file $(TESTWAVE_DIR)/$(TESTWAVE_FILES)
:
# input files
:
# requirements
<threading>multi
<variant>debug
<link>static # Linking to DLL tested by testwave_dll
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
# <define>BOOST_LIB_DIAGNOSTIC=1
:
# name
testwave
]
# test the Slex wave lexing component
[
run
# sources
../testlexers/test_slex_lexer.cpp
/boost/wave//boost_wave
/boost/program_options//boost_program_options
/boost/filesystem//boost_filesystem
/boost/thread//boost_thread
/boost/system//boost_system
/boost/xpressive//boost_xpressive
:
# arguments
:
# input files
:
# requirements
<threading>multi
<variant>debug
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
:
# name
test_slex_lexer
]
# test the Re2C wave lexing component
[
run
# sources
../testlexers/test_re2c_lexer.cpp
/boost/wave//boost_wave
/boost/program_options//boost_program_options
/boost/filesystem//boost_filesystem
/boost/thread//boost_thread
/boost/system//boost_system
:
# arguments
:
# input files
:
# requirements
<threading>multi
<variant>debug
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
:
# name
test_re2c_lexer
]
# test the lexertl wave lexing component
[
run
# sources
../testlexers/test_lexertl_lexer.cpp
/boost/wave//boost_wave
/boost/program_options//boost_program_options
/boost/filesystem//boost_filesystem
/boost/thread//boost_thread
/boost/system//boost_system
:
# arguments
:
# input files
:
# requirements
<threading>multi
<variant>debug
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
# to generate wave_lexertl_tables_next_token.hpp:
# <define>BOOST_WAVE_LEXERTL_GENERATE_CPP_CODE=1
# to use the resulting static tables:
# <define>BOOST_WAVE_LEXERTL_USE_STATIC_TABLES=1
:
# name
test_lexertl_lexer
]
# test the xlex wave lexing component
[
run
# sources
../testlexers/test_xlex_lexer.cpp
/boost/wave//boost_wave
/boost/program_options//boost_program_options
/boost/filesystem//boost_filesystem
/boost/thread//boost_thread
/boost/system//boost_system
/boost/xpressive//boost_xpressive
:
# arguments
:
# input files
:
# requirements
<threading>multi
<variant>debug
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
:
# name
test_xlex_lexer
]
[
run
# sources
../testwave/quick.cpp
/boost/wave//boost_wave
/boost/thread//boost_thread
/boost/filesystem//boost_filesystem
]
[
run
# sources
../testwave/default_hooks.cpp
/boost/wave//boost_wave
/boost/thread//boost_thread
/boost/filesystem//boost_filesystem
]
[
run
# sources
../testwave/fill_boundary.cpp
/boost/wave//boost_wave
/boost/thread//boost_thread
/boost/filesystem//boost_filesystem
]
;