visit
visit copied to clipboard
CMake modernization: start using BLT
Description
Demonstrate use of BLT, and export of VisIt targets.
BLT: requires SOURCES to be passed to blt_add_library
, so VisIt libraries whose sources live in subdirectories must have the subdirs populate a SOURCES list.
The macro visit_append_list
was added for this reason.
It can be used to populate any list, and caller is responsible for clearing the created cache vars to avoid polluting CMakeCache.txt.
visitcommon
and avtdbatts
libraries demonstrate its use.
Simple libraries also updated: lightweight_visit_vtk
, visit_vtk
, and avtmath
.
For export of visit targets, visit_install_export_targets
function was added.
The only difference it offers beyond VISIT_INSTALL_TARGETS
is use of the EXPORT option in the install
command.
All INCLUDES
use $<BUILD_INTERFACE: ...>
and $<INSTALL_INTERFACE: ...>
.
This ensures that VisIt includes are listed with a path relative to the install directory, and makes the exports 'relocatable'.
vtSkew.h was moved from visit_vtk/full
to visit_vtk/lightweight
, because lightweight includes it but should not have dependencies on visit_vtk/full
.
To demonstrate what the export set for VisIt will be, tmp\cmake
dir was created to temporarily house the files that get generated and installed. They won't be part of the PR when it is ready for final review.
These cmake files won't be of much use until all of VisIt has been updated to properly export targets, and when Third party targets are properly accounted for/found in visitConfig.cmake (or other file(s) included by visitConfig.cmake).
I have verified the pluginVsInstall tests work with these changes. Other tests also work, but aren't as much of a concern as basic VisIt functionality isn't being changed.
Type of change
- [ ] Bug fix~~
- [ ] New feature~~
- [ ] Documentation update~~
- [ ] Other~~
How Has This Been Tested?
Reminders:
- Please follow the style guidelines of this project.
- Please perform a self-review of your code before submitting a PR and asking others to review it.
- Please assign reviewers (see VisIt's PR procedures for more information).
Checklist:
- [ ] I have commented my code where applicable.~~
- [ ] I have updated the release notes.~~
- [ ] I have made corresponding changes to the documentation.~~
- [ ] I have added debugging support to my changes.~~
- [ ] I have added tests that prove my fix is effective or that my feature works.~~
- [ ] I have confirmed new and existing unit tests pass locally with my changes.~~
- [ ] I have added new baselines for any new tests to the repo.~~
- [ ] I have NOT made any changes to protocol or public interfaces in an RC branch.~~