summaryrefslogtreecommitdiffstats
path: root/cmake/modules/Distutils.cmake
diff options
context:
space:
mode:
authorKefu Chai <tchaikov@gmail.com>2022-04-21 00:31:21 +0200
committerKefu Chai <tchaikov@gmail.com>2022-04-21 00:52:18 +0200
commitea4ae6d2f17ae8dcfb3d6f215d53b3f82a99270d (patch)
tree027bb0750110c1a8a53d8c516f3e5c6085b037cd /cmake/modules/Distutils.cmake
parentMerge pull request #45973 from ionutbalutoiu/add-windows-tests (diff)
downloadceph-ea4ae6d2f17ae8dcfb3d6f215d53b3f82a99270d.tar.xz
ceph-ea4ae6d2f17ae8dcfb3d6f215d53b3f82a99270d.zip
cmake/modules: use exact version of python3 when finding cython
* CMakeLists.txt: always pass "EXACT" to find_package(Python3). because per cmake document, "EXACT" only takes effect when <Package>_FIND_VERSION_COUNT is greater than 1, where <Package> is "Python3". see also cmake/modules/FindPython/Support.cmake * cmake/modules/AddCephTest.cmake: drop redundant find_package(Python3) calls. since Python3 is a mandatory requirement for building Ceph, we only need a single call of find_package(Python3..) in the top of the source tree. the only possible case to repeat it is to ensure that we have the correct version of Python3 used in following CMake script. but there is no need to repeat it if we just want to ensure that we have a python3 interpretor in place. * cmake/modules/Distutils.cmake: always pass "EXACT" to find_package(Python3). we should always pass EXACT to find_package() when finding python3, this is a follow-up of e2babdfae8c99f39f99a7c8a8f966299b2e62b19 Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Diffstat (limited to 'cmake/modules/Distutils.cmake')
-rw-r--r--cmake/modules/Distutils.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake
index d3aff02cd51..192c8c3efe2 100644
--- a/cmake/modules/Distutils.cmake
+++ b/cmake/modules/Distutils.cmake
@@ -6,7 +6,7 @@ include(CMakeParseArguments)
# the building host happens to have a higher version of python3, that version
# would be picked up instead by find_package(Python3). and that is not want we
# expect.
-find_package(Python3 ${WITH_PYTHON3}
+find_package(Python3 ${WITH_PYTHON3} EXACT
QUIET
REQUIRED
COMPONENTS Interpreter)