mirror of
https://github.com/boostorg/config.git
synced 2026-04-29 02:24:13 +02:00
Simplify runtime config check Jamfiles.
This commit is contained in:
+5
-14
@@ -208,20 +208,13 @@ void write_build_check_jamfile()
|
||||
"# Boost Software License, Version 1.0. (See accompanying file \n"
|
||||
"# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n\n"
|
||||
"import modules ;\nimport path ; \n\n"
|
||||
"actions simple_run_action\n"
|
||||
"{\n"
|
||||
" $(>) > $(<)\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"rule run-simple ( sources + : args * : input-files * : requirements * : target-name )\n"
|
||||
"rule run-simple ( requirements * : target-name )\n"
|
||||
"{\n"
|
||||
" obj $(target-name)_obj : $(sources) : $(requirements) ;\n"
|
||||
" obj $(target-name)_obj : test_case.cpp : $(requirements) ;\n"
|
||||
" explicit $(target-name)_obj ;\n"
|
||||
" exe $(target-name)_exe : $(target-name)_obj : $(requirements) ;\n"
|
||||
" explicit $(target-name)_exe ;\n"
|
||||
" #testing.capture-output $(target-name)_output : $(target-name) : $(requirements) <name>$(target-name) ;\n"
|
||||
" make $(target-name).output : $(target-name)_exe : @simple_run_action ;\n"
|
||||
" explicit $(target-name).output ;\n"
|
||||
" unit-test $(target-name) : $(target-name)_obj : $(requirements) ;\n"
|
||||
" explicit $(target-name) ;\n"
|
||||
"}\n\n"
|
||||
;
|
||||
ofs << build_config_jamfile.str() << std::endl;
|
||||
@@ -301,9 +294,7 @@ void process_ipp_file(const fs::path& file, bool positive_test)
|
||||
// Generate data for the build-checks Jamfile:
|
||||
static const boost::regex feature_regex("boost_(?:no|has)_(.*)");
|
||||
std::string feature_name = boost::regex_replace(namespace_name, feature_regex, "\\1");
|
||||
build_config_jamfile << "run-simple test_case.cpp : : : <define>TEST_" << macro_name << " : " << feature_name << " ;\n";
|
||||
build_config_jamfile << "alias " << feature_name << " : " << feature_name << ".output ;\n";
|
||||
build_config_jamfile << "explicit " << feature_name << " ;\n";
|
||||
build_config_jamfile << "run-simple <define>TEST_" << macro_name << " : " << feature_name << " ;\n";
|
||||
}
|
||||
|
||||
int cpp_main(int argc, char* argv[])
|
||||
|
||||
Reference in New Issue
Block a user