-
Notifications
You must be signed in to change notification settings - Fork 45
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
Expand TribitsExampleProject2 packages and TPLs (#299) #469
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bartlettroscoe
added
component: documentation
component: core
component: testing
Dealing with automated testing not specific to any other component
labels
Mar 20, 2022
This is so that when I add new Tpls to this, they will each have their own install dir to improve testing (but not ease of usage).
Just installs for now.
Just installs for now.
Added Package2 and tests to TribitsExampleProject2.
…S cache var triggers lib finds (#299) It seems reasonable that if the user needs to define libraries for a TPL with what otherwise is defined as a TPL with only header files (specified by the FindTPL<tplName>.cmake file by setting 'REQUIRED_HEADERS' but not 'REQUIRED_LIBS_NAMES') then setting the cache var TPL_<tplName>_LIBRARY_NAMES should trigger the find for specified libraries. I will add a real test for this next.
Also: * I had to add FindTPLTpl2.cmake now that it is being used. * I made a minor change to Tpl3.cpp to improve code formatting.
Now future refactorings will ensure that the libraries are all listed and in the right order As part of this: * Move NINJA_EXE and rulesNinjaFilePath to CommonArgumentsCMakeProjects.cmake so all tests can use it. * Added -GNinja and -v to build so we can see the link lines
…les (#299) With this, you only need to set up <tplName>_LIBRARY_DIRS and <tplName>_INCLUDE_DIRS for the libraries and header files for just those TPLs. TriBITS takes care of putting the include dirs and library dirs in the right order after that. This is what you want you configure lines to work with. After we add TPL dependencies, then we can remove the "ToDo:" lines added in the package cmake/Dependencies.cmake files as we don't need to list all of the (indirect) dependent upstream TPLs. NOTE: The strong tests that check that the right TPL libraries are present and in the right order still pass. That shows that old-school TriBITS is doing its job.
…_tpl_vars tests (#299) This shows that setting explict TPL libraries and include dirs also works as it should and avoids the need for any find operations.
This is needed to force off the prefind for TPLs that are set up to use find_package(). I needed to add this for the updated TribitsExampleProject2_find_tpl_parts tests that only set CMAKE_PREFIX_PATH but still wanted to run the individual find_file() and find_library() functions.
* The library tpl2a depends on tpl1::tpl1 but not the library tpl2b according to the Tpl2::b_deps() * Package3 depends on Package2, Package1, Tpl4, and Tpl2 and **not** Tpl3 * I adjusted formatting of deps() functions to make dependencies more clear
bartlettroscoe
force-pushed
the
299-expanded-example2
branch
from
March 26, 2022 14:19
69c8e6f
to
61958f1
Compare
I had to modify the test for the TribitsExampleProject2_find_package case because TribitsExampleProject2 has not been updated for the internal find_package() case yet.
bartlettroscoe
force-pushed
the
299-expanded-example2
branch
from
March 28, 2022 15:13
61958f1
to
8c5e182
Compare
bartlettroscoe
force-pushed
the
299-expanded-example2
branch
from
March 29, 2022 01:43
8c5e182
to
425b044
Compare
bartlettroscoe
changed the title
WIP: Expand TribitsExampleProject2 packages and TPLs (#299)
Expand TribitsExampleProject2 packages and TPLs (#299)
Mar 29, 2022
Since no one is going to review this anytime soon, I will go ahead and merge. One can always do a post-merge review if needed. |
bartlettroscoe
requested review from
rabartlett1972
and removed request for
rabartlett1972
March 29, 2022 14:37
rabartlett1972
previously approved these changes
Mar 29, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (I am the same person who wrote it so I can't do a better job of reviewing this than myself).
bartlettroscoe
dismissed
rabartlett1972’s stale review
March 29, 2022 15:14
So I can test auto-merge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component: core
component: documentation
component: testing
Dealing with automated testing not specific to any other component
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is driving #299
I need a deeper set of TPL dependencies to be able to test the next refactoring in TriBITS towards modern CMake targets (#299).
There are also a few related TriBITS changes part of this
<tplName>_ALLOW_PACKAGE_PREFIND
(commit 627917c)tribits_tpl_find_include_dirs_and_libraries()
:<tplName>_LIBRARY_NAMES
cache var triggers lib finds (commit 3764e8b)NOTE: This PR looks intimidating with 47 changed files and over 900 lines changed but most of that is testing code and very simple code for the TPLs,
TribitsExampleProject2
, andTribitsExampleApp2
.This updated
TribitsExampleProject2
is not quite done yet. I need to update support for optional upstream dependencies correctly to drive varied tests but this PR is a good start.