Skip to content

GeoModelVisualization CMake Cleanup, master branch (2020.11.16.)

This is a big update triggered by !22 (closed)... I tried to bring the configuration of the GeoModelVisualization/ sub-directory/project in line with that of the GeoModelCore/ and other well-behaved sub-projects.

In order to simplify the logic in these files a bit, I first of all introduced a bunch of ALIAS libraries in the "base projects", to be able to refer to them like GeoModelCore::GeoModelKernel, even when everything is being built as a single big project.

After that I updated the Setup<Foo>.cmake files of the "main project" to have include guards in them. This way GeoModelVisualization/CMakeLists.txt could simply include SetupJSON.cmake, and avoid re-implementing the same logic for handling the nlohman_json external under all possible situations.

I also greatly simplified how .ui and .rcc files would be handled by the build. Just relying on CMake to handle them automatically as much as possible.

There are still a couple of things missing, hence the WIP label. But I wanted to allow @rbianchi and @nkoehler to try out this configuration even before it would be fully ready. As there are only so many platforms that I can test this myself on.

P.S. I also updated GeoModelIO/GeoModelDBManager/src/GMDBManager.cpp. Since I noticed in my build that GCC complains about that code. For a good reason. One is not supposed to call delete on the sqlite3 pointer. That's an "opaque" type that should only be created/handled/deleted using the sqlite3_<foo>(...) functions. So sqlite3_close(...) is enough to remove the underlying object from memory.

Edited by Attila Krasznahorkay

Merge request reports