diff --git a/tools/generate.cpp b/tools/generate.cpp index 01b73597..a8595fbc 100644 --- a/tools/generate.cpp +++ b/tools/generate.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -267,10 +268,10 @@ void process_ipp_file(const fs::path& file, bool positive_test) // get the output filesnames: boost::regex file_regex("boost_([^.]+)\\.ipp"); - positive_file = file.branch_path() / boost::regex_replace(file.leaf().string(), file_regex, "$1_pass.cpp"); - negative_file = file.branch_path() / boost::regex_replace(file.leaf().string(), file_regex, "$1_fail.cpp"); - write_test_file(positive_file, macro_name, namespace_name, file.leaf().string(), positive_test, true); - write_test_file(negative_file, macro_name, namespace_name, file.leaf().string(), positive_test, false); + positive_file = file.parent_path() / boost::regex_replace(file.filename().string(), file_regex, "$1_pass.cpp"); + negative_file = file.parent_path() / boost::regex_replace(file.filename().string(), file_regex, "$1_fail.cpp"); + write_test_file(positive_file, macro_name, namespace_name, file.filename().string(), positive_test, true); + write_test_file(negative_file, macro_name, namespace_name, file.filename().string(), positive_test, false); // always create config_test data, // positive and negative tests go to separate streams, because for some @@ -280,7 +281,7 @@ void process_ipp_file(const fs::path& file, bool positive_test) if(!positive_test) *pout << "n"; *pout << "def " << macro_name - << "\n#include \"" << file.leaf().string() << "\"\n#else\nnamespace " + << "\n#include \"" << file.filename().string() << "\"\n#else\nnamespace " << namespace_name << " = empty_boost;\n#endif\n"; config_test2 << " if(0 != " << namespace_name << "::test())\n" @@ -291,12 +292,12 @@ void process_ipp_file(const fs::path& file, bool positive_test) // always generate the jamfile data: jamfile << "test-suite \"" << macro_name << "\" : \n" - "[ run " << positive_file.leaf().string() << "