This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Use CMake interface targets to setup benchmark flags
ClosedPublic

Authored by ldionne on Sep 22 2021, 1:09 PM.

Details

Summary

This is a re-application of da0592e4c8df which was reverted in
1454018dc1d9 because it was incompatible with older CMakes.
Instead, disable the benchmarks when CMake is too old to
support those idioms.

Diff Detail

Event Timeline

ldionne created this revision.Sep 22 2021, 1:09 PM
ldionne requested review of this revision.Sep 22 2021, 1:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 22 2021, 1:09 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
jloser added a subscriber: jloser.Sep 22 2021, 1:15 PM
jloser added inline comments.
libcxx/benchmarks/CMakeLists.txt
100

Nit: are we consistent whether to quote arguments or not? For example, below we say -lc++fs -lc++experimental, i.e. unquoted, but here we quote "-lstdc++fs". I'd like to be consistent at least within this neighborhood of code; I don't feel strongly on either way.

ldionne updated this revision to Diff 374347.Sep 22 2021, 1:21 PM
ldionne marked an inline comment as done.

Address review comments

libcxx/benchmarks/CMakeLists.txt
100

Agreed, I'll unquote. Thanks for noticing. However, that makes me notice that I wasn't quoting the paths in other places, and we definitely want to do that in case they contain spaces.

jloser added inline comments.Sep 22 2021, 1:45 PM
libcxx/benchmarks/CMakeLists.txt
100

Makes sense. Yeah, we definitely want to quote paths.

xgupta added a subscriber: xgupta.Sep 23 2021, 4:28 AM
ldionne updated this revision to Diff 374539.Sep 23 2021, 7:27 AM

Fix build issues with quoting

ldionne accepted this revision.Sep 23 2021, 9:13 AM
This revision is now accepted and ready to land.Sep 23 2021, 9:13 AM