Reorganize shared unit test code
[alexxy/gromacs.git] / src / gromacs / analysisdata / tests / CMakeLists.txt
index 4dd11ef08f0eaca7b59de8fdff8798e73f5941a3..7bde033ed629630fbcd4c9fb25e8d3264c7c1be4 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2011,2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2011,2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
 # To help us fund GROMACS development, we humbly ask that you cite
 # the research papers on the package. Check out http://www.gromacs.org.
 
+add_library(analysisdata-test-shared OBJECT
+            datatest.cpp
+            mock_datamodule.cpp)
+
 gmx_add_unit_test(AnalysisDataUnitTests analysisdata-test
                   analysisdata.cpp
                   arraydata.cpp
                   average.cpp
                   histogram.cpp
-                  lifetime.cpp)
+                  lifetime.cpp
+                  $<TARGET_OBJECTS:analysisdata-test-shared>)