Convert test infrastructure targets to static library targets.
authorM. Eric Irrgang <ericirrgang@gmail.com>
Mon, 5 Aug 2019 15:32:20 +0000 (18:32 +0300)
committerPaul Bauer <paul.bauer.q@gmail.com>
Tue, 6 Aug 2019 13:19:11 +0000 (15:19 +0200)
commit1e4d55737f381c52c5ebecf5e0b69f65fdd65564
treecafae915c5ee6e3b8c650e0e8f7b410d867e3fc4
parent5142d1292bcc4383203bc9c5c69968b2b939202f
Convert test infrastructure targets to static library targets.

Convert CMake function `gmx_add_unit_test_object_library()` to
`gmx_add_unit_test_library()` and produce STATIC instead of OBJECT
targets. Update `mdrun_test_objlib` to `mdrun_test_infrastructure`
using the helper function.

This allows the target to use `target_link_libraries` to get the
compiler flags, definitions, and include directories necessary for
compatibility with `gmock` and other resources. Resolves some noisiness
from googletest headers under the standard GROMACS `-Wundef` flag.
Relevant to related change that migrate from global GMOCK variables to
modern usage of gtest and gmock CMake targets.

Removed unnecessary TESTUTILS_LIBS variable.

Refs #3033

Change-Id: Id5b47774b679e8e205f899ea80df65153da44516
src/api/cpp/tests/CMakeLists.txt
src/api/cpp/workflow/tests/CMakeLists.txt
src/gromacs/analysisdata/tests/CMakeLists.txt
src/gromacs/commandline/tests/CMakeLists.txt
src/gromacs/gpu_utils/tests/CMakeLists.txt
src/gromacs/mdrunutility/tests/CMakeLists.txt
src/gromacs/onlinehelp/tests/CMakeLists.txt
src/gromacs/trajectoryanalysis/tests/CMakeLists.txt
src/programs/mdrun/tests/CMakeLists.txt
src/testutils/CMakeLists.txt
src/testutils/TestMacros.cmake