Closed obsgolem closed 1 month ago
See https://github.com/corrosion-rs/corrosion/blob/062e03c7653e58ffc9a5e8b04251413f07d06bf3/cmake/FindRust.cmake#L28C9-L28C19. When run with the appropriate conditions, we get the error
Cannot set "Rust_FOUND": current scope has no parent.
Or the variable gets set in the wrong scope.
FindRust should not have the PARENT_SCOPE argument on that line. This is due to macros not introducing a scope.
PARENT_SCOPE
Run find_package(Rust) from a top level CMakeLists.txt with Rust not installed.
find_package(Rust)
- OS: - CMake: - CMake Generator:
No response
Thanks for the report!
Current Behavior
See https://github.com/corrosion-rs/corrosion/blob/062e03c7653e58ffc9a5e8b04251413f07d06bf3/cmake/FindRust.cmake#L28C9-L28C19. When run with the appropriate conditions, we get the error
Or the variable gets set in the wrong scope.
Expected Behavior
FindRust should not have the
PARENT_SCOPE
argument on that line. This is due to macros not introducing a scope.Steps To Reproduce
Run
find_package(Rust)
from a top level CMakeLists.txt with Rust not installed.Environment
CMake configure log with Debug log-level
No response
CMake Build step log
No response