Skip to content
Snippets Groups Projects
Commit 5190a377 authored by Ammar Nejati's avatar Ammar Nejati
Browse files

Merge branch 'multipythonTests' into 'develop2'

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 (via `MakeSwigLib` and `MakePythonWheel` modules). In this way, the Python-related part of the build mechanism is enclosed in `MakePythonAPI`.

* Differentiated between `BORNAGAIN_PYTHON` variable and `WITH_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 of `MakeSharedLib`.

* GUI:
  * `SampleListView`: Added proper preprocessor guards for `BORNAGAIN_PYTHON`.
  * Improved and cleaned up `CMakeLists.txt`.
  * Test: Minor improvements.

See merge request !593
parents 6bac041a 755df70d
No related branches found
No related tags found
1 merge request!593Build and perform the tests for all Python versions (Major change)
Pipeline #54515 passed
Showing
with 559 additions and 200 deletions
Loading
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