Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
1084f640
Commit
1084f640
authored
10 years ago
by
Van Herck, Walter
Browse files
Options
Downloads
Plain Diff
Merge branch 'pyscripttests' into develop
parents
4ac20260
89d9cc77
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Core/Tools/src/PyGenTools.cpp
+2
-1
2 additions, 1 deletion
Core/Tools/src/PyGenTools.cpp
cmake/modules/SearchInstalledSoftware.cmake
+3
-1
3 additions, 1 deletion
cmake/modules/SearchInstalledSoftware.cmake
cmake/scripts/BAPython.h.in
+23
-0
23 additions, 0 deletions
cmake/scripts/BAPython.h.in
with
28 additions
and
2 deletions
Core/Tools/src/PyGenTools.cpp
+
2
−
1
View file @
1084f640
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
cmake/modules/SearchInstalledSoftware.cmake
+
3
−
1
View file @
1084f640
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
cmake/scripts/BAPython.h.in
0 → 100644
+
23
−
0
View file @
1084f640
// ************************************************************************** //
//
// 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment