Skip to content

CMake: Fix accidental variable expansion of WASI#5084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kateinoigakukun
Copy link
Member

CMake recently introduced a new variable WASI to check if the target platform is WASI (https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9659). However, the change led to WASI being expanded as a variable, which is not what we want in checking the platform name.

To have compatibility with older and newer versions of CMake, we should quote the string WASI to prevent it from being expanded as a variable.

CMake recently introduced a new variable `WASI` to check if the target platform is WASI (https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9659). However, the change led to `WASI` being expanded as a variable, which is not what we want in checking the platform name. To have compatibility with older and newer versions of CMake, we should quote the string `WASI` to prevent it from being expanded as a variable.
@MaxDesiatov
Copy link
Contributor

@kateinoigakukunkateinoigakukun merged commit c542180 into swiftlang:mainSep 20, 2024
2 of 3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
@kateinoigakukun@MaxDesiatov
close