swiftlang / swift-corelibs-foundation

The Foundation Project, providing core utilities, internationalization, and OS independence
swift.org
Apache License 2.0
5.29k stars 1.13k forks source link

CMake: Fix accidental variable expansion of `WASI` #5084

Closed kateinoigakukun closed 1 month ago

kateinoigakukun commented 1 month ago

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 commented 1 month ago

@swift-ci test