Generalize constraints on MPI rank counts for tests
[alexxy/gromacs.git] / src / gromacs / utility / tests / CMakeLists.txt
index c88bf29fcea871c7b5d34440c6db9f47efd55411..d2a35adda283bab249f93a31be15eee09d1446ee 100644 (file)
@@ -1,7 +1,8 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
+# Copyright (c) 2017,2018,2019,2020,2021, 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.
 # the research papers on the package. Check out http://www.gromacs.org.
 
 gmx_add_unit_test(UtilityUnitTests utility-test
-                  alignedallocator.cpp
-                  arrayref.cpp
-                  bitmask32.cpp bitmask64.cpp bitmask128.cpp
-                  defaultinitializationallocator.cpp
-                  enumerationhelpers.cpp
-                  keyvaluetreeserializer.cpp
-                  keyvaluetreetransform.cpp
-                  gmxregex.cpp
-                  logger.cpp
-                  mutex.cpp
-                  path.cpp
-                  physicalnodecommunicator.cpp
-                  stringutil.cpp
-                  textreader.cpp
-                  textwriter.cpp
-                  typetraits.cpp
-                  )
+    CPP_SOURCE_FILES
+        alignedallocator.cpp
+        arrayref.cpp
+        bitmask32.cpp bitmask64.cpp bitmask128.cpp
+        cstringutil.cpp
+        defaultinitializationallocator.cpp
+        enumerationhelpers.cpp
+        fixedcapacityvector.cpp
+        inmemoryserializer.cpp
+        keyvaluetreeserializer.cpp
+        keyvaluetreetransform.cpp
+        listoflists.cpp
+        logger.cpp
+        mdmodulesnotifier.cpp
+        message_string_collector.cpp
+        path.cpp
+        physicalnodecommunicator.cpp
+        range.cpp
+        strconvert.cpp
+        stringtoenumvalueconverter.cpp
+        stringutil.cpp
+        template_mp.cpp
+        textreader.cpp
+        textwriter.cpp
+        typetraits.cpp
+        )
+# TODO: Explicitly link specific modules.
+target_link_libraries(utility-test PRIVATE legacy_modules)
 
-gmx_add_mpi_unit_test(UtilityMpiUnitTests utility-mpi-test 4
-                  physicalnodecommunicator-mpi.cpp
-                  )
+gmx_add_mpi_unit_test(UtilityMpiUnitTests utility-mpi-test 2
+    CPP_SOURCE_FILES
+        physicalnodecommunicator_mpi.cpp
+        )