This is an archive of the discontinued LLVM Phabricator instance.

[unittest] Restructure plugin cmake target
ClosedPublic

Authored by IBricchi on Dec 22 2022, 2:35 PM.

Details

Summary

Move plugin source and cmake files into separate directory.
Typically cmake targets in LLVM have a single target per directory.
This change brings this unittest more inline with that structure.

Diff Detail

Event Timeline

IBricchi created this revision.Dec 22 2022, 2:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2022, 2:35 PM
IBricchi updated this revision to Diff 484969.Dec 22 2022, 2:36 PM

Add new lines to end of files

IBricchi updated this revision to Diff 484970.Dec 22 2022, 2:37 PM

Fix missindentation

IBricchi published this revision for review.Dec 22 2022, 2:40 PM

I moved the plugins into their own directory similar to https://reviews.llvm.org/D140559.

This reduces how many files need to be set as optional sources, however this folder still contains two unit tests as separate targets, so we still do need to have optional sources set when defining each target.

We could separate these two out into their own subdirectories aswell wdyt?

Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2022, 2:40 PM

We could separate these two out into their own subdirectories aswell wdyt?

IMHO that'd be a good change.

IBricchi updated this revision to Diff 485061.Dec 23 2022, 12:59 AM

Move all cmake targets into their own subdirectory

IBricchi updated this revision to Diff 485063.Dec 23 2022, 1:00 AM

Add new line at end of files

thakis accepted this revision.Dec 23 2022, 6:10 AM

Thanks, that looks much nicer!

llvm/unittests/Passes/Plugins/DoublerPlugin/CMakeLists.txt
1 ↗(On Diff #485063)

should the two plugin dirs be below llvm/unittests/Passes/PassBuilderBindings now? (up to you)

This revision is now accepted and ready to land.Dec 23 2022, 6:10 AM
IBricchi added inline comments.Dec 23 2022, 7:09 AM
llvm/unittests/Passes/Plugins/DoublerPlugin/CMakeLists.txt
1 ↗(On Diff #485063)

I don't think so since it's the "Passes/Plugins/PluginsTests.cpp" file that uses them

I don't have commit access, could one of you two commit this for me?

Username: ibricchi
Email: ibricchi@student.ethz.ch

IBricchi updated this revision to Diff 498354.Feb 17 2023, 6:41 AM

Implement fix for AIX cmake issue from https://reviews.llvm.org/D140559

I wanted to check again if someone could commit this for me since I don't have commit access
ibricchi <ibricchi@student.ethz.ch>

This revision was automatically updated to reflect the committed changes.
llvm/unittests/Passes/CMakeLists.txt