Commit Graph

4 Commits

Author SHA1 Message Date
Kai Kang
fe12f39721 cmake: add support for python 3.10
Signed-off-by: Kai Kang <Kai.Kang@windriver.com>
2021-10-22 14:59:28 +08:00
Yanfei Xu
8f0a3fa1ff cmake: add support for python3.9
add support for python3.9.

Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
2020-11-11 10:43:37 +08:00
Kefu Chai
47d0e1e16d cmake: CMAKE_ROLE defaults to "PROJECT"
so we can use exported targets like "Python3::Python", which is defined
only if CMAKE_ROLE is "PROJECT". but this global property was introduced
by CMake 3.14, but the minimum required version of CMake is 3.10.2 in
Ceph project at this moment. let's set it if it's not defined.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-19 10:58:58 +08:00
Kefu Chai
5e2bd7fc4d cmake: update FindPython* modules
use the ones shiped from the latest cmake. which

* enables us to find the recent python intepreter and development files,
* find intepreter and development in a single `find_pacakge()` command,
  simpler this way and less error prone.

and to accomodate this change:

* all `PYTHON${PYTHON_VERSION}_*` variables are renamed to
  `Python${PYTHON_VERSION}_*` if we use `find_package(Python2...)` or
  `find_package(Python3...)` to find python2 or python3 instead of using
  `find_package(Python...)`.
* use "2" explicitly when using python2, as `Python_*` variables are not
  defined anymore
* when compiling python support of ceph-mgr, continue using `Python_*`
  variables. because we find the python interpreter and development
  files using `find_pacakge(Python...)` for ceph-mgr.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-07-20 22:35:07 +08:00