CMake Cleanup, master branch (2020.10.26.)
In connection to atlas/atlasexternals!745 (merged) I was trying to clean up the CMake configuration of the repository a bit before collecting the new version into the Athena nightlies. The set of changes grew pretty big unfortunately.
In the "main project configuration" I shuffled the files around a little, and removed some files that I felt really didn't deserve to be separate files. The main CMakeLists.txt
file of the repository is reasonably short. It doesn't make it more readable if we move O(5) line chunks out of it into separate files. Also, I didn't think that having CMake files in separate cmake/
and dependencies/
directories was a nice setup. I just moved everything (that I kept) under cmake/
.
I then updated the Setup<Foo>.cmake
files to set up "imported targets" for the things that they're building, if the user requests this project to build those externals. So that the different libraries/executables could set up dependencies on imported targets like Eigen3::Eigen
, XercesC::XercesC
, etc. Which is important to make the exported CMake configurations relocatable.
Then I updated the configuration of GeoModelCore
, GeoModelIO
and GeoModelTools
to set up themselves in a reasonably consistent way. Relying on the newly introduced imported targets for their builds, and updating their exported CMake configurations to look for the external dependencies needed by these sub-projects when the user sets up these sub-projects.
I also tweaked the CPack configuration of these 3 sub-projects. Note that in this area we should do more though. Right now CPack doesn't quite behave how I think everybody assumes it does. CPack only builds a single package out of the entire repository. (Or 2 RPMs/DEBs for the runtime and development packages.) So the separate CPack configurations for the different sub-projects are just piling on each other. CPack in the end obeys the last set of configuration options that it sees. Which are coming from GeoModelTools/cmake/GeoModelToolsPackaging.cmake
at the moment...
Finally I adjusted the CI setup a bit. I had to realise that the macOS CI machine used by the main repository is not available to the forks of the repository. (And it's good like this. Private machines should not be possible to use from forks.) So I tried to extend the CI setup to turn off those tests in a fork. However I'm not at all sure that my incantation is correct at the moment.
On top of this I also updated the CI to install CMake 3.14 on Ubuntu for the test. Which is something that we discussed with @rbianchi offline for a bit, but we could continue the discussion on here.
Merge request reports
Activity
added 1 commit
- bbf44528 - Created a way to control the default debug level of GeoModelRead through the build configuration.
Okay, so this would be my proposal for providing default build flags to
GeoModelRead
. Note that this way an interactive build configuration also has the chance to show the user that these flags are available, and also show the descriptions that we've put on them. (In case you were not sure what these documentation strings are for. )mentioned in merge request !15 (closed)
Thanks a lot for your work on the restructuring, @akraszna , and for all the invaluable suggestions!!
Merging.
Edited by Riccardo Maria Bianchienabled an automatic merge when the pipeline for bbf44528 succeeds
mentioned in commit b7c5e688