mirror of
https://github.com/boostorg/config.git
synced 2026-04-29 02:24:13 +02:00
Revert "Add new build-time configuration feature."
This reverts commit dad7bc5b30.
Conflicts:
checks/config.jam
This commit is contained in:
@@ -38,8 +38,6 @@ std::stringstream config_test1a;
|
||||
std::stringstream config_test2;
|
||||
std::stringstream jamfile;
|
||||
std::stringstream jamfile_v2;
|
||||
std::stringstream build_config_test;
|
||||
std::stringstream build_config_jamfile;
|
||||
std::set<std::string> macro_list;
|
||||
|
||||
|
||||
@@ -186,31 +184,6 @@ void write_test_file(const fs::path& file,
|
||||
}
|
||||
}
|
||||
|
||||
void write_build_tests()
|
||||
{
|
||||
fs::ofstream ofs(config_path / ".." / "checks" / "test_case.cpp");
|
||||
time_t t = std::time(0);
|
||||
ofs << "// This file was automatically generated on " << std::ctime(&t);
|
||||
ofs << "// by libs/config/tools/generate.cpp\n" << copyright << std::endl;
|
||||
ofs << build_config_test.str() << std::endl;
|
||||
ofs << "int main( int, char *[] )\n{\n" << " return test::test();\n}\n\n";
|
||||
}
|
||||
|
||||
void write_build_check_jamfile()
|
||||
{
|
||||
fs::ofstream ofs(config_path / ".." / "checks" / "Jamfile.v2");
|
||||
time_t t = std::time(0);
|
||||
ofs << "#\n# *** DO NOT EDIT THIS FILE BY HAND ***\n"
|
||||
"# This file was automatically generated on " << std::ctime(&t);
|
||||
ofs << "# by libs/config/tools/generate.cpp\n"
|
||||
"# Copyright John Maddock.\n"
|
||||
"# Use, modification and distribution are subject to the \n"
|
||||
"# 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";
|
||||
ofs << build_config_jamfile.str() << std::endl;
|
||||
}
|
||||
|
||||
void process_ipp_file(const fs::path& file, bool positive_test)
|
||||
{
|
||||
std::cout << "Info: Scanning file: " << file.string() << std::endl;
|
||||
@@ -277,15 +250,6 @@ void process_ipp_file(const fs::path& file, bool positive_test)
|
||||
"[ run ../" << positive_file.leaf().string() << " ]\n"
|
||||
"[ compile-fail ../" << negative_file.leaf().string() << " ] ;\n";
|
||||
|
||||
// Generate data for the Build-checks test file:
|
||||
build_config_test << "#ifdef TEST_" << macro_name << std::endl;
|
||||
build_config_test << "# include \"../test/" << file.leaf().string() << "\"\n";
|
||||
build_config_test << "namespace test = " << namespace_name << ";\n#endif\n";
|
||||
|
||||
// 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 test_case.cpp : : : <define>TEST_" << macro_name << " : " << feature_name << " ;\nexplicit " << feature_name << " ;\n";
|
||||
}
|
||||
|
||||
int cpp_main(int argc, char* argv[])
|
||||
@@ -321,8 +285,6 @@ int cpp_main(int argc, char* argv[])
|
||||
write_config_test();
|
||||
write_jamfile_v2();
|
||||
write_config_info();
|
||||
write_build_tests();
|
||||
write_build_check_jamfile();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user