Open hmeine opened 1 year ago
So, I tried the default macros out, and while it feels better to have less code, I did not have more success with it. In particular, while FindPython3 supports more attractive COMPONENTS including "Numpy", it fails to detect my MacPorts-installed NumPy. (Our old code using numpy.distutils robustly does the detection, but throws a deprecation warning, because numpy.distutils will be removed following the deprecation of distutils itself, so we will eventually need an alternative.)
maybe try again now that some of the build system has been revamped
I always have to pass a lot of explicit variable definitions to CMake and wonder if there are better configuration macros nowadays.
From what I can see, we introduced quite some custom configuration code back then in order to work around limitations of the default macros coming with CMake, but CMake has improved a lot in the meantime.
For instance, there is this comment:
followed by 160 LOC of a workaround, and the python libraries themselves are also detected with custom routines, following
When looking at https://cmake.org/cmake/help/latest/module/FindPythonLibs.html, it nowadays states
indicating that that should no longer be necessary. Furthermore, PythonInterp+PythonLibs are deprecated in favor of Python3 (requiring CMake 3.12, which is not much more than 3.10 which we have been specifying as minimum version since March 2021).
Finally, https://cmake.org/cmake/help/latest/module/FindBoost.html has an example section that suggests that one can also specify the required python version:
so hopefully all previous issues with the default scripts are solved.