mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-07 16:13:27 +08:00
fix(cmake): reduce chance for variable collision (#3302)
This commit is contained in:
parent
62c4909cce
commit
d58699c9ab
@ -82,11 +82,11 @@ if(NOT DEFINED ${_Python}_EXECUTABLE)
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT ${_Python}_EXECUTABLE STREQUAL PYTHON_EXECUTABLE_LAST)
|
if(NOT ${_Python}_EXECUTABLE STREQUAL PYBIND11_PYTHON_EXECUTABLE_LAST)
|
||||||
# Detect changes to the Python version/binary in subsequent CMake runs, and refresh config if needed
|
# Detect changes to the Python version/binary in subsequent CMake runs, and refresh config if needed
|
||||||
unset(PYTHON_IS_DEBUG CACHE)
|
unset(PYTHON_IS_DEBUG CACHE)
|
||||||
unset(PYTHON_MODULE_EXTENSION CACHE)
|
unset(PYTHON_MODULE_EXTENSION CACHE)
|
||||||
set(PYTHON_EXECUTABLE_LAST
|
set(PYBIND11_PYTHON_EXECUTABLE_LAST
|
||||||
"${${_Python}_EXECUTABLE}"
|
"${${_Python}_EXECUTABLE}"
|
||||||
CACHE INTERNAL "Python executable during the last CMake run")
|
CACHE INTERNAL "Python executable during the last CMake run")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user