Normalize testutils use in `api/` directory.
authorM. Eric Irrgang <ericirrgang@gmail.com>
Fri, 8 Oct 2021 11:38:37 +0000 (14:38 +0300)
committerMark Abraham <mark.j.abraham@gmail.com>
Sat, 9 Oct 2021 00:20:54 +0000 (00:20 +0000)
Move the testutils boiler plate up one level from
`api/nblib/CMakeLists.txt` to `api/CMakeLists.txt` so that the whole
directory tree can use the same configuration without duplication.

api/CMakeLists.txt
api/nblib/CMakeLists.txt

index fdf3a2a5956fba13012ad67680db7a5ada2fe633..19403e054fa72f253553f10ab67cbb35ad7d3bbe 100644 (file)
 # To help us fund GROMACS development, we humbly ask that you cite
 # the research papers on the package. Check out http://www.gromacs.org.
 
+set(TESTUTILS_DIR ${PROJECT_SOURCE_DIR}/src/testutils)
+if (BUILD_TESTING)
+    if(NOT GMX_DEVELOPER_BUILD)
+        set(UNITTEST_TARGET_OPTIONS EXCLUDE_FROM_ALL)
+    endif()
+    include(${TESTUTILS_DIR}/TestMacros.cmake)
+endif()
+
 # The legacy public API headers may still be installed,
 # but may be removed or changed without warning.
 add_subdirectory(legacy)
index fcf9b2868fb7daa2e37c743d403a15cdf00ce6e5..5c95c8c03aff3bb160476870f4584bbc6bfb78da 100644 (file)
 # \author Sebastian Keller <keller@cscs.ch>
 #
 
-set(TESTUTILS_DIR ${PROJECT_SOURCE_DIR}/src/testutils)
-if (BUILD_TESTING)
-    if(NOT GMX_DEVELOPER_BUILD)
-        set(UNITTEST_TARGET_OPTIONS EXCLUDE_FROM_ALL)
-    endif()
-    include(${TESTUTILS_DIR}/TestMacros.cmake)
-endif()
-
 add_custom_target(nblib-tests
         COMMENT "Target to build all nblib tests including samples"
         )