Build and perform the tests for all Python versions (Major change)
The unit and functional tests, as well as the example tests, can be built for all Python versions; i.e., the main version and the Python versions set via BORNAGAIN_PYTHON_PACKAGE_VERSIONS
variable.
The tests for the extra Python versions are built by setting the variable BORNAGAIN_PYTHON_PACKAGE_TESTS=ON
.
-
A
tests
subfolder is added to the main binary directory to to store the built tests for the main version and their output. -
A
tests
subfolder is added to the build directory for Python packages to store the built tests and their output. -
Adapted unit and functional tests for multiple Python versions.
NOTE:-
Functional/PyEmbedded
test still cannot be performed for the Python packages, most probably due to a problem with proper usage of the Python C/API. Currently, it is produced only for the main version. - The GUI test is performed only for the main version, since the Python packages does not include a GUI.
-
-
A new CMake module
MakePythonAPI
is introduced to produce the Python interfaces to the C++ libraries.MakePythonAPI
includes the necessary CMake code to build the Python interfaces and Python packages (viaMakeSwigLib
andMakePythonWheel
modules). In this way, the Python-related part of the build mechanism is enclosed inMakePythonAPI
. -
Differentiated between
BORNAGAIN_PYTHON
variable andWITH_PYTHON_API
argument:-
BORNAGAIN_PYTHON
= Add Python-related functionality to the C++ libraries. -
WITH_PYTHON_API
= Add a Python interface to the C++ libraries; currently made with SWIG.
-
-
Adapted
CMakeLists.txt
for all modules (Base
,Fit
, etc.) to the new interface ofMakeSharedLib
. -
GUI:
-
SampleListView
: Added proper preprocessor guards forBORNAGAIN_PYTHON
. - Improved and cleaned up
CMakeLists.txt
. - Test: Minor improvements.
-