From: Daniel Gonzalez Date: Tue, 25 Jun 2013 14:06:37 +0000 (+0200) Subject: Feature #2042 bbpConfigurator X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0bc7fe23d8ae2e04232a470518899826a8ec354d;p=bbtk.git 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. --- 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; }