This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix a few incorrect CMake configuration options
ClosedPublic

Authored by ldionne on Aug 14 2023, 3:21 PM.

Details

Reviewers
philnik
Group Reviewers
Restricted Project
Restricted Project
Commits
rG760261a3daf9: [libc++] Fix a few incorrect CMake configuration options
Summary

This patch fixes a few CMake options that were set using incorrect
mechanisms.

CMake's man page for the -D <var>=<value> option states: If a command in
the project sets the type to PATH or FILEPATH, then the <value> will be
converted to an absolute path. That's not what we want for most of the
paths we have as configuration options. Otherwise, using -D to set the
configuration option results in an absolute path being used, which
breaks things.

option() denotes a boolean variable, but what was desired was a
string/list variable. Fix this to prevent cmake from changing any
non-empty user provided values to 'ON'.

Diff Detail

Event Timeline

ldionne created this revision.Aug 14 2023, 3:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 3:21 PM
ldionne requested review of this revision.Aug 14 2023, 3:21 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 14 2023, 3:21 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik accepted this revision.Aug 16 2023, 11:02 AM
This revision is now accepted and ready to land.Aug 16 2023, 11:02 AM
This revision was automatically updated to reflect the committed changes.