This is an archive of the discontinued LLVM Phabricator instance.

[gn build] Slightly simplify write_cmake_config.
ClosedPublic

Authored by thakis on Dec 1 2018, 5:03 PM.

Details

Summary

Before, the script had a bunch of special cases for #cmakedefine and #cmakedefine01 and then did general variable substitution. Now, the script always does general variable substitution for all lines and handles the special cases afterwards.

This has no observable effect for the inputs we use, but is easier to explain and slightly easier to implement.

Also mention to link to CMake's configure_file() in the docstring.

(The new behavior doesn't quite match CMake on lines like #cmakedefine ${FOO}, but nobody does that.)

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Dec 1 2018, 5:03 PM
phosek accepted this revision.Dec 2 2018, 1:20 PM

LGTM

This revision is now accepted and ready to land.Dec 2 2018, 1:20 PM
This revision was automatically updated to reflect the committed changes.