This is an archive of the discontinued LLVM Phabricator instance.

Make unittests include path relative
ClosedPublic

Authored by sebastian-ne on Jan 27 2020, 5:44 AM.

Details

Summary

This change is relevant when embedding the llvm cmake project into
another project. It should not change the build behavior of a normal
llvm build.

In the case where llvm is embedded as a cmake subproject,
CMAKE_SOURCE_DIR does not point to the expected directory and building
the tests fails.
Using CMAKE_CURRENT_SOURCE_DIR fixes this problem, as it will always
point to the same directory.

Diff Detail

Event Timeline

sebastian-ne created this revision.Jan 27 2020, 5:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2020, 5:44 AM

Is someone willing to review this?

nhaehnle accepted this revision.Feb 20 2020, 7:59 AM
nhaehnle added a subscriber: nhaehnle.

LGTM

This revision is now accepted and ready to land.Feb 20 2020, 7:59 AM
This revision was automatically updated to reflect the committed changes.