Build prevent stale references#1
Conversation
… to build. For example, my Silicon Mac found old x86 built libraries that were around for some reason
There was a problem hiding this comment.
Code Review
This pull request introduces macOS-specific library search path preferences in CMake and improves Lua compatibility in the CLI prelude by providing a fallback for table.unpack. The review feedback suggests a safer check for CMAKE_FIND_FRAMEWORK in CMake to avoid overwriting variables defined in toolchain files or parent scopes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| option(COMPUTER_CPP_ENABLE_WARNINGS "Enable strict compiler warnings for project targets" ON) | ||
| option(COMPUTER_CPP_ENABLE_SANITIZERS "Enable AddressSanitizer and UndefinedBehaviorSanitizer for project targets" OFF) | ||
|
|
||
| if(APPLE AND NOT DEFINED CACHE{CMAKE_FIND_FRAMEWORK}) |
There was a problem hiding this comment.
Using NOT DEFINED CACHE{CMAKE_FIND_FRAMEWORK} only checks if the variable is defined in the CMake cache. If a toolchain file or a parent scope defines CMAKE_FIND_FRAMEWORK as a normal variable, this check will evaluate to true and overwrite that setting with LAST.
Using NOT DEFINED CMAKE_FIND_FRAMEWORK is safer and more robust as it respects both cache overrides and normal variable overrides (e.g., from toolchain files or parent scopes).
if(APPLE AND NOT DEFINED CMAKE_FIND_FRAMEWORK)
unpackiftable.unpackis not available