Task #3033

Updated by Eric Irrgang almost 1 year ago

There is a little bit of noise left from but there is also some house keeping we can do.

Because we have moved to CMake 3.9, we could start using the and

We would also like to store a single copy of the googletest source in the repository, but we need to find a good way to use the bundled source when building the @python_packaging/sample_restraint@ tests in the same build tree.

h2. modernizing usage in CMake

0. -Reduce Reduce use of global CMake variables for tests and test support targets ( (
1. -Move Move custom googletest CMakeLists.txt file out of the way so that we can have a more standard googletest distribution in place.- place.
2. Remove global definitions of variables that are redundant with properties of the gtest and gmock targets.
3. -Import Import missing googletest files that allow for standard definitions of gtest and gmock targets. Replace GROMACS custom targets with standard targets.- targets.
4. Migrate consuming targets from variable usage to target dependencies and other modern CMake tools.

h2. Update: post-release-2020

Mitigation has included a lot of infrastructure in the form of additional CMake macros. There are also several patches applied to the googletest source that are non-trivial to reapply. Maintainability may be improved by
* simplifying infrastructure in terms behavior from more recent versions of CMake
* updating to more recent googletest in need of less patching
* maintaining the googletest patch separate from the googletest source
* isolating the googletest CMake environment, such as with ExternalProject, to reduce the need to manage multiple sets of compiler flags (warning suppressions)

The current issue can be closed when these proposals have been applied, rejected, or moved to separately tracked issues.