Make the library modular usable.

This commit is contained in:
Rene Rivera
2024-03-11 08:38:17 -05:00
parent 237e69caf6
commit 85580fd1ea
6 changed files with 92 additions and 66 deletions

View File

@ -5,6 +5,7 @@
project
: requirements
<source>/boost/detail//boost_detail
<threading>multi
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
<toolset>msvc-7.1:<define>TEST_MFC=1
@ -21,6 +22,7 @@ project
#<toolset>gcc-mingw:<link>static
#<toolset>gcc-cygwin:<link>static
<toolset>sun:<link>static
<include>../src
;
#
@ -28,7 +30,7 @@ project
#
rule regex-test ( name : sources + : requirements * : input-files * )
{
return [ run $(sources) ../build//boost_regex
return [ run $(sources) /boost/regex//boost_regex
:
: $(input-files)
: $(requirements)
@ -80,22 +82,22 @@ local regress-sources = regress/$(R_SOURCE) ;
test-suite regex
:
[ run regress/$(R_SOURCE) ../build//boost_regex ../build//icu_options
[ run regress/$(R_SOURCE) /boost/regex//boost_regex ../build//icu_options
: # command line
: # input files
: # requirements
: regex_regress ]
[ run regress/$(R_SOURCE) ../build//boost_regex
../../thread/build//boost_thread ../build//icu_options
[ run regress/$(R_SOURCE) /boost/regex//boost_regex
/boost/thread//boost_thread ../build//icu_options
: # command line
: # input files
: # requirements
<define>TEST_THREADS
: regex_regress_threaded ]
[ run regress/$(R_SOURCE) ../build//boost_regex
../../thread/build//boost_thread ../build//icu_options
[ run regress/$(R_SOURCE) /boost/regex//boost_regex
/boost/thread//boost_thread ../build//icu_options
: # command line
: # input files
: # requirements
@ -114,67 +116,72 @@ test-suite regex
: c_compiler_checks/wide_posix_api_check.cpp ]
[ run pathology/bad_expression_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
[ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
]
[ run pathology/recursion_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
[ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
]
[ run named_subexpressions/named_subexpressions_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
[ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
]
[ run unicode/unicode_iterator_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
[ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
release <define>TEST_UTF8 : unicode_iterator_test_utf8 ]
[ run unicode/unicode_iterator_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
[ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
release <define>TEST_UTF16 : unicode_iterator_test_utf16 ]
[ run unicode/unicode_casefold_test.cpp
../build//boost_regex ../build//icu_options
/boost/regex//boost_regex ../build//icu_options
]
[ run static_mutex/static_mutex_test.cpp
../../thread/build//boost_thread ../build//boost_regex
/boost/thread//boost_thread /boost/regex//boost_regex
/boost/timer//boost_timer
: : : <define>BOOST_TIMER_ENABLE_DEPRECATED
]
[ run object_cache/object_cache_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
[ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
]
[ run config_info/regex_config_info.cpp
../build//boost_regex/<link>static
/boost/regex//boost_regex/<link>static
: # command line
: # input files
: <test-info>always_show_run_output
<use>/boost/config//testing
]
[ run config_info/regex_config_info.cpp ../build//boost_regex
[ run config_info/regex_config_info.cpp /boost/regex//boost_regex
: # command line
: # input files
: <test-info>always_show_run_output
<use>/boost/config//testing
: regex_dll_config_info
]
]
[ run collate_info/collate_info.cpp ../build//boost_regex
[ run collate_info/collate_info.cpp /boost/regex//boost_regex
: : : <test-info>always_show_run_output : test_collate_info ]
[ link concepts/concept_check.cpp :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
[ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
]
[ link concepts/concept_check.cpp :
<define>BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : <build>no ] : standalone_concept_check
]
[ link concepts/icu_concept_check.cpp :
<define>BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
<define>BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
]
[ link concepts/icu_concept_check.cpp :
[ check-target-builds ../build//is_legacy_03 : : <build>no ] : standalone_icu_concept_check
]
[ link concepts/range_concept_check.cpp :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
[ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
<source>/boost/range//boost_range
]
[ run concepts/test_bug_11988.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
[ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
]
[ run
@ -184,10 +191,11 @@ test-suite regex
: # additional args
: # test-files
: # requirements
<source>/boost/array//boost_array
<threading>multi
<define>BOOST_REGEX_MATCH_EXTRA=1
<define>BOOST_REGEX_NO_LIB=1
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
[ check-target-builds ../build//is_legacy_03 : : <source>/boost/regex//boost_regex ]
: # test name
captures_test
]
@ -219,7 +227,7 @@ compile test_consolidated.cpp ;
build-project ../example ;
# `quick` target (for CI)
run quick.cpp ../build//boost_regex ;
run quick.cpp /boost/regex//boost_regex ;
compile test_warnings.cpp
: <toolset>msvc:<warnings>all <toolset>msvc:<warnings-as-errors>on
@ -239,4 +247,4 @@ compile test_windows_defs_2.cpp ;
compile test_windows_defs_3.cpp ;
compile test_windows_defs_4.cpp ;
run issue153.cpp : : : <toolset>msvc:<linkflags>-STACK:2097152 ;
run issue153.cpp : : : "<toolset>msvc:<linkflags>-STACK:2097152" ;

View File

@ -19,7 +19,7 @@
#endif
#define main OLD_MAIN
#include <libs/config/test/config_info.cpp>
#include <config_info.cpp>
#undef main
#ifndef NEW_MAIN
# define NEW_MAIN main

View File

@ -10,8 +10,8 @@
*/
#include <libs/regex/src/posix_api.cpp>
#include <libs/regex/src/regex.cpp>
#include <libs/regex/src/regex_debug.cpp>
#include <libs/regex/src/static_mutex.cpp>
#include <libs/regex/src/wide_posix_api.cpp>
#include <posix_api.cpp>
#include <regex.cpp>
#include <regex_debug.cpp>
#include <static_mutex.cpp>
#include <wide_posix_api.cpp>