Skip to content

Conversation

@petk
Copy link
Owner

@petk petk commented Dec 18, 2024

This is a first mitigation step to start taking care of the global scope annoyances.

All cache variables of some project should be scoped inside some namespace. In CMake's case, at the time of writing, this can be taken care of prefixing all variable names. For example, with 'PHP_'.

Specifically, this issue is noticed when using the CMake's FetchContent module, where concerns with cache variables overrides from one project to the other can happen as the same CMakeCache.txt file is used for the entire build.

petk added 2 commits December 18, 2024 16:49
This is a first mitigation step to start taking care of the global state
annoyances.

All cache variables of some project should be scoped inside some
namespace. In CMake's case, at the time of writing, this can be taken
care of prefixing all variable names. For example, with 'PHP_'.

Specifically, this issue is noticed when using the CMake's
`FetchContent` module, where concerns with cache variables overrides
from one project to the other can happen as the same CMakeCache.txt
file is used for the entire build.
@petk petk merged commit 8d6ddb5 into PHP-8.3 Dec 18, 2024
1 of 3 checks passed
@petk petk deleted the patch-cache-variables branch December 18, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants