Commit d58699c9 by Henry Schreiner Committed by GitHub

fix(cmake): reduce chance for variable collision (#3302)

parent 62c4909c
...@@ -82,11 +82,11 @@ if(NOT DEFINED ${_Python}_EXECUTABLE) ...@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment