Skip to content
Snippets Groups Projects
Commit 1084f640 authored by Van Herck, Walter's avatar Van Herck, Walter
Browse files

Merge branch 'pyscripttests' into develop

parents 4ac20260 89d9cc77
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@
#include "MultiLayer.h"
#include "PyGenTools.h"
#include "Simulation.h"
#include "BAPython.h"
std::string PyGenTools::genPyScript(Simulation *simulation)
{
......@@ -97,7 +98,7 @@ bool PyGenTools::testPyScript(Simulation *simulation)
// simulation->getIntensityData());
// boost::scoped_ptr<const OutputData<double> > simulated_data(
// pSimulation->getIntensityData());
std::string command = "python PythonScript.py";
std::string command = std::string(BORNAGAIN_PYTHON_EXE ) + " PythonScript.py";
int return_code = std::system(command.c_str());
(void)return_code;
if (std::remove("PythonScript.py") != 0) {
......
......@@ -17,7 +17,7 @@ find_package(FFTW REQUIRED)
# --- BOOST ---
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
add_definitions(-DBOOST_ALL_DYN_LINK) # line is needed for MSVC
#add_definitions(-DBOOST_LIB_DIAGNOSTIC) # shows during compilation auto-linked libraries
......@@ -72,6 +72,8 @@ if(BORNAGAIN_PYTHON OR BORNAGAIN_GUI)
ValidatePythonIntstallation()
configure_file("${CMAKE_SOURCE_DIR}/cmake/scripts/BAPython.h.in" "${CMAKE_BINARY_DIR}/BAPython.h" @ONLY)
if(NOT PYTHONLIBS_FOUND)
message(FATAL_ERROR "No Python library has been found")
endif()
......
// ************************************************************************** //
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Tools/inc/BAPython.h
//! @brief Defines configuration variables
//!
//! @homepage http://apps.jcns.fz-juelich.de/BornAgain
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2013
//! @authors Scientific Computing Group at MLZ Garching
//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke
//
// ************************************************************************** //
#ifndef BAPYTHON_H
#define BAPYTHON_H
/* Configuration file will be automatically regenerated by CMake */
#define BORNAGAIN_PYTHON_EXE "@PYTHON_EXECUTABLE@"
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment