mirror of
https://github.com/pybind/pybind11.git
synced 2026-06-28 18:37:02 +00:00
The previous commit's `NOT DEFINED PYBIND11_USE_CROSSCOMPILING` guard broke the intended auto-default for top-level / add_subdirectory builds: CMakeLists.txt runs `option(PYBIND11_USE_CROSSCOMPILING ... OFF)` before including pybind11Common.cmake, so the variable is already defined (OFF) and the CMP0190 default never applied. Capture, before the option() call, whether the project set the value itself, and let pybind11Common.cmake apply its default unless the value was set explicitly. This keeps both the emulator override fix and the CMP0190 auto-default for subdirectory consumers. Assisted-by: ClaudeCode:claude-opus-4.8