mirror of
https://github.com/boostorg/lexical_cast.git
synced 2026-07-21 13:23:34 +00:00
Add support for modular build structure. (#78)
This is part of the effort to make the Boost libraries "modular" for build and consumption. See https://lists.boost.org/Archives/boost/2024/01/255704.php and https://github.com/grafikrobot/boost-b2-modular/blob/b2-modular/README.adoc for more information. This PR depends on the following other PRs being merged to both develop and master branches of the respective repos: - https://github.com/boostorg/boost/pull/854
This commit is contained in:
committed by
GitHub
parent
7f121f8ce3
commit
71a184d20f
@@ -0,0 +1,27 @@
|
||||
# Copyright René Ferdinand Rivera Morell 2023-2024
|
||||
# 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.2 ;
|
||||
|
||||
constant boost_dependencies :
|
||||
/boost/config//boost_config
|
||||
/boost/container//boost_container
|
||||
/boost/core//boost_core
|
||||
/boost/throw_exception//boost_throw_exception
|
||||
/boost/type_traits//boost_type_traits ;
|
||||
|
||||
project /boost/lexical_cast
|
||||
: common-requirements
|
||||
<include>include
|
||||
;
|
||||
|
||||
explicit
|
||||
[ alias boost_lexical_cast : : : : <library>$(boost_dependencies) ]
|
||||
[ alias all : boost_lexical_cast test ]
|
||||
;
|
||||
|
||||
call-if : boost-library lexical_cast
|
||||
;
|
||||
|
||||
+11
-5
@@ -5,13 +5,15 @@
|
||||
# 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 testing ;
|
||||
import feature ;
|
||||
|
||||
import ../../config/checks/config : requires ;
|
||||
|
||||
project
|
||||
: requirements
|
||||
<library>/boost/lexical_cast//boost_lexical_cast
|
||||
[ requires cxx11_rvalue_references cxx11_static_assert cxx11_template_aliases ]
|
||||
<link>static
|
||||
<toolset>gcc-4.7:<cxxflags>-ftrapv
|
||||
@@ -29,6 +31,10 @@ project
|
||||
# Not a lexical_cast related warning: boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp:78:1: warning: empty macro arguments are a C99 feature [-Wc99-extensions]
|
||||
# boost/mpl/iter_fold.hpp:45:1: warning: empty macro arguments are a C99 feature [-Wc99-extensions]
|
||||
<toolset>clang:<cxxflags>-Wno-c99-extensions
|
||||
|
||||
<library>/boost/array//boost_array
|
||||
<library>/boost/range//boost_range
|
||||
<library>/boost/utility//boost_utility
|
||||
;
|
||||
|
||||
# Thanks to Steven Watanabe for helping with <nowchar> feature
|
||||
@@ -57,7 +63,7 @@ test-suite conversion
|
||||
[ run containers_test.cpp : : : <toolset>gcc:<cxxflags>-Wno-long-long <toolset>clang:<cxxflags>-Wno-long-long ]
|
||||
[ run empty_input_test.cpp ]
|
||||
[ run pointers_test.cpp ]
|
||||
[ compile typedefed_wchar_test.cpp : <toolset>msvc:<nowchar>on ]
|
||||
[ compile typedefed_wchar_test.cpp : <toolset>msvc:<nowchar>on <library>/boost/date_time//boost_date_time ]
|
||||
[ run typedefed_wchar_test_runtime.cpp : : : <toolset>msvc:<nowchar>on <toolset>msvc,<stdlib>stlport:<build>no ]
|
||||
[ run no_locale_test.cpp : : : <define>BOOST_NO_STD_LOCALE <define>BOOST_LEXICAL_CAST_ASSUME_C_LOCALE ]
|
||||
[ run no_exceptions_test.cpp : : : <exception-handling>off
|
||||
@@ -74,14 +80,14 @@ test-suite conversion
|
||||
[ run stream_traits_test.cpp ]
|
||||
[ compile-fail to_pointer_test.cpp ]
|
||||
[ compile-fail from_volatile.cpp ]
|
||||
[ run filesystem_test.cpp ../../filesystem/build//boost_filesystem/<link>static ]
|
||||
[ run filesystem_test.cpp /boost/filesystem//boost_filesystem/<link>static ]
|
||||
[ run try_lexical_convert.cpp ]
|
||||
;
|
||||
|
||||
# Assuring that examples compile and run. Adding sources from `example` directory to the `conversion` test suite.
|
||||
for local p in [ glob ../example/*.cpp ]
|
||||
{
|
||||
conversion += [ run $(p) ] ;
|
||||
conversion += [ run $(p) : : : <library>/boost/variant//boost_variant <library>/boost/date_time//boost_date_time ] ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user