From 0bc7fe23d8ae2e04232a470518899826a8ec354d Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Tue, 25 Jun 2013 16:06:37 +0200 Subject: [PATCH] Feature #2042 bbpConfigurator This application should replace the macro BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT in order to organize the includes so the dependecies are taken into account. Fix: When there are no bbs files, it should still create a bbp file. --- .../appli/bbpConfigurator/bbpConfigurator.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/kernel/appli/bbpConfigurator/bbpConfigurator.cpp b/kernel/appli/bbpConfigurator/bbpConfigurator.cpp index 8e151da..4d71e23 100644 --- a/kernel/appli/bbpConfigurator/bbpConfigurator.cpp +++ b/kernel/appli/bbpConfigurator/bbpConfigurator.cpp @@ -68,6 +68,29 @@ int main(int argc, char **argv) if(files.size() == 0) { std::cout << "No files to check." << std::endl; + + // Write results to bbp file + #ifdef WIN32 + std::string fname = path_out + "\\" + package_name + ".bbp"; + #else + std::string fname = path_out + "/" + package_name + ".bbp"; + #endif + + std::ofstream out(fname.c_str()); + out << "#-----------------------------------------" << std::endl; + out << "# Include script for bbtk package '" << package_name << "'" << std::endl; + out << "# Automatically generated by bbpConfigurator" << std::endl; + out << "#-----------------------------------------" << std::endl; + out << "load "<< package_name << std::endl; + out << "#-----------------------------------------" << std::endl; + out << "package "<< package_name << std::endl; + out << "#-----------------------------------------" << std::endl; + out << "endpackage" << std::endl; + out << "#-- EOF ----------------------------------" << std::endl; + + out.close(); + + return 0; } -- 2.46.1