-
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
Add TribitsExampleApp and tests to test TriBITS-generated <Package>Config.cmake files (#299) #414
Add TribitsExampleApp and tests to test TriBITS-generated <Package>Config.cmake files (#299) #414
Conversation
Now we can really test the <Package>Config.cmake and <Project>Config.cmake files produced by TriBITS. This will allow for confident refactoring to modern CMake targets in TriBITS.
…TSPub#299) This is an extra check that the right test output is being produced showing the libs are being pulled in and called.
Get ready to find individual packages and then more stuff.
…ub#299) I added a test for this as well. This tests that case and shows you don't really need the top-level project find_package() command. Finding things at the package-level is more flexible as it gives greater freedom in how packages are built and installed.
… dir (TriBITSPub#299) This is to test and protect functionality that was implemented and used by I think the Dakota project years ago. They use this to get at Teuchos. See NOTE in the test CMakeLists.txt file for more details.
Hello @bartlettroscoe I was able to build and test the changes. All test regarding this example app have passed. |
This new example could likely use a TribitsExampleApp/README.md file to explain what I write above but I can do that later. This example may change some as we complete #299 and #63 so we might as well wait to document it after that. (But if we do those refactorings correctly to maintain backward compatibility, this example and the tests using it should not have to change at all. That is the whole point of having this example and the TriBITS tests based on it actually.) I will go ahead and merge this so that I can do the follow-on work. |
Working towards #299
This PR adds the new example/test raw CMake project TribitsExampleApp. It define a C++ application that calls some functions defined in TribitsExampleProject (TribitsExProj) and pulls in what it needs through
<Package>Config.cmake
files. This APP can conditionally use different packages/components from TribitsExampleProject and can pull in eitherfind_package(TribitExProj REQUIRED COMPONENTS ... )
at the project level or pull in individual packages with individualfind_package(<Package> REQUIRED)
calls.The primary purpose of CMake project is to test the
<Package>Config.cmake
files currently being generated by TriBITS. I added several TriBITS tests with this for these files both being installed and those being placed in the build tree.With these tests in place, I feel fairly confidence to refactor the existing library and exec targets for internal packages to use modern modern CMake for handling include dirs and other bits of info (see #299).