]> Creatis software - bbtk.git/commitdiff
Feature #2042 bbpConfigurator
authorDaniel Gonzalez <daniel@daniel.laptop>
Tue, 25 Jun 2013 14:06:37 +0000 (16:06 +0200)
committerDaniel Gonzalez <daniel@daniel.laptop>
Tue, 25 Jun 2013 14:06:37 +0000 (16:06 +0200)
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.

kernel/appli/bbpConfigurator/bbpConfigurator.cpp

index 8e151da84e477955c648d003e3fe1ffa424c54a5..4d71e23801504750cf323d8a2688fefaa86258c4 100644 (file)
@@ -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;
   }