You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[cmake] Change CMake Policy CMP0054 for Cygwin (#4274)
In CMake 3.4.3, if `CMP0054` policy isn't set to any value, `cmake`
uses the OLD behavior and issues a long warning message for every
`if()` statement having a quoted variable whose value is an other
variable's name.
For example,
```
set(FOO 1)
set(VAR_A FOO)
set(VAR_B BAR)
if ("${VAR_A}" STREQUAL "FOO")
endif()
if ("${VAR_B}" STREQUAL "BAR")
endif()
```
issues `CMP0054` warning message for `"${VAR_A}"` and not for
`"${VAR_B}"`.
Cygwin `cmake` defines the variable `CMAKE_SYSTEM_NAME` as `CYGWIN`
and defines the variable `CYGWIN` as 1(TRUE).
Linux `cmake` defines the variable `CMAKE_SYSTEM_NAME` as `Linux`
and there is no variable `Linux`.
So, if we didn't set any value to `CMP0054` policy, every
`if ("${CMAKE_SYSTEM_NAME}" ...)` generated long warning message in
Cygwin, but did not generate in Linux.
0 commit comments