This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Modernize some conditionals. NFC
ClosedPublic

Authored by smeenai on Dec 1 2017, 12:40 PM.

Details

Summary

I'm not sure what the "x..." form was needed for, but it looks super
old-school and unnecessary. Just reference the variable directly and
adjust the comparison strings accordingly.

Diff Detail

Repository
rL LLVM

Event Timeline

smeenai created this revision.Dec 1 2017, 12:40 PM
compnerd accepted this revision.Dec 3 2017, 10:23 PM

Looks like a carry-over from the autoconf conversion (where it is used to deal with a posix sh limitation.

This revision is now accepted and ready to land.Dec 3 2017, 10:23 PM
beanz accepted this revision.Dec 4 2017, 4:16 PM

This is a workaround predating CMake 3.1 when they fixed the underlying issues with the expansion of variables in STREQUAL. See: https://cmake.org/cmake/help/v3.1/policy/CMP0054.html.

LGTM.

This revision was automatically updated to reflect the committed changes.