FEM Post: Give access to cmake BUILD variables from python

This commit adds a attribute __cmake__ to App which is a list holding all compile time cmake variables starting with BUILD.

Only export BUILD variables
This commit is contained in:
Stefan Tröger
2016-02-27 11:23:24 +01:00
committed by wmayer
parent 9c61e2f386
commit 3bf749f0fd
4 changed files with 272 additions and 0 deletions

View File

@@ -129,6 +129,7 @@ using namespace boost::program_options;
// scriptings (scripts are build in but can be overridden by command line option)
#include "InitScript.h"
#include "TestScript.h"
#include "CMakeScript.h"
#ifdef _MSC_VER // New handler for Microsoft Visual C++ compiler
# include <new.h>
@@ -1292,6 +1293,7 @@ void Application::initApplication(void)
{
// interpreter and Init script ==========================================================
// register scripts
new ScriptProducer( "CMakeVariables", CMakeVariables );
new ScriptProducer( "FreeCADInit", FreeCADInit );
new ScriptProducer( "FreeCADTest", FreeCADTest );
@@ -1310,6 +1312,7 @@ void Application::initApplication(void)
// starting the init script
Console().Log("Run App init script\n");
Interpreter().runString(Base::ScriptFactory().ProduceScript("CMakeVariables"));
Interpreter().runString(Base::ScriptFactory().ProduceScript("FreeCADInit"));
}