Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print target properties recursively and with regular expressions #590

Merged
merged 32 commits into from
Oct 4, 2022

Conversation

chapman39
Copy link
Contributor

@chapman39 chapman39 commented Aug 3, 2022

Adds three more arguments to blt_print_target_properties

  • CHILDREN (true/ false) whether or not you want to print the target's children's properties as well (recursively)
  • PROPERTY_NAME_REGEX (regular expression string) reduce which properties to print by name
  • PROPERTY_VALUE_REGEX (regular expression string) reduce which properties to print by value

Each target will only have its properties printed once

Also adds .gitignore file to ignore a VSCode file

@chapman39 chapman39 added the wip label Aug 3, 2022
@chapman39 chapman39 self-assigned this Aug 3, 2022
@chapman39 chapman39 changed the title WIP: Print target properties recursively and with regular expressions Print target properties recursively and with regular expressions Aug 9, 2022
@chapman39 chapman39 requested a review from white238 August 9, 2022 00:24
@chapman39 chapman39 removed the wip label Aug 9, 2022
cmake/BLTMacros.cmake Outdated Show resolved Hide resolved
cmake/BLTMacros.cmake Outdated Show resolved Hide resolved
@white238
Copy link
Member

@chapman39 don't forget to update the docs here: docs/api/target_properties.rst

As well as adding a message in the RELEASE-NOTES.md

@chapman39
Copy link
Contributor Author

Ready for review

Copy link
Contributor

@bmhan12 bmhan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! This will be very useful for debugging. Had some minor comments on documentation.

## blt_find_target_dependencies(TARGET <target> TLIST tlist)
##
## Store all target's dependencies (link libraries and interface link libraries)
## recursively in TLIST.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## recursively in TLIST.
## recursively in tlist.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it should still be capital TLIST but ill change the wording to explain TLIST holds the name of the variable that has the list.

so its like:

  • arg_TLIST = "my_list"
  • ${arg_TLIST} = my_list = "target1;target2;target3"

docs/api/target_properties.rst Outdated Show resolved Hide resolved
docs/api/target_properties.rst Show resolved Hide resolved
@bmhan12
Copy link
Contributor

bmhan12 commented Sep 22, 2022

Also: Looks like the Mac Image version will need to be updated: https://dev.azure.com/llnl-blt/BLT/_build/results?buildId=1328&view=logs&j=8dab7c2a-824f-53c4-ff36-17cdfa82e5d3

blt/azure-pipelines.yml

Lines 53 to 55 in 7b3b13d

osx_gcc:
VM_ImageName: 'macos-1015'
CMAKE_FLAGS: ''

@white238
Copy link
Member

Built docs are here:

https://llnl-blt.readthedocs.io/en/feature-chapman39-print_target_properties_recursive/api/target_properties.html#blt-print-target-properties

@white238
Copy link
Member

Also: Looks like the Mac Image version will need to be updated: https://dev.azure.com/llnl-blt/BLT/_build/results?buildId=1328&view=logs&j=8dab7c2a-824f-53c4-ff36-17cdfa82e5d3

blt/azure-pipelines.yml

Lines 53 to 55 in 7b3b13d

osx_gcc:
VM_ImageName: 'macos-1015'
CMAKE_FLAGS: ''

Well i was originally going to say address this after but its blocking the builds. @chapman39 can you fix this before merging?

@chapman39
Copy link
Contributor Author

Passing osx_gcc, but now I'm failing three of the gitlab tests since it's saying I'm an unauthorized user (or maybe it's referring to a service user?)

@white238
Copy link
Member

Passing osx_gcc, but now I'm failing three of the gitlab tests since it's saying I'm an unauthorized user (or maybe it's referring to a service user?)

Not sure what the problem was. I retried and it passed.

RELEASE-NOTES.md Outdated Show resolved Hide resolved
Co-authored-by: Chris White <white238@llnl.gov>
Copy link
Member

@white238 white238 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chapman39 ! This is a huge improvement!

Copy link
Member

@kennyweiss kennyweiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chapman39 -- I'm looking forward to using this!

Comment on lines +278 to +282
message(STATUS "")
message(STATUS "Exercising blt_print_target_properties macro. Testing infinite recursion")
blt_register_library(NAME foo DEPENDS_ON bar)
blt_register_library(NAME bar DEPENDS_ON foo)
blt_print_target_properties(TARGET bar CHILDREN true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@white238 white238 merged commit 197eacc into develop Oct 4, 2022
@white238 white238 deleted the feature/chapman39/print_target_properties_recursive branch October 4, 2022 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants