cmake: fix build with GMX_EXTERNAL_TNG=ON
authorChristoph Junghans <junghans@votca.org>
Thu, 3 Nov 2016 18:12:17 +0000 (12:12 -0600)
committerChristoph Junghans <junghans@votca.org>
Thu, 10 Nov 2016 16:43:18 +0000 (17:43 +0100)
tng_set_source_properties is not defined in case of GMX_EXTERNAL_TNG=ON
due to the fact that BuildTNG.cmake never gets included. Also this
call isn't really needed tng doesn't get compile when external anyway.

Change-Id: Id3c7e0da55ce9ef8cf43d2aecaa187e965bf6ad2

src/gromacs/CMakeLists.txt

index b7d9bf47da46e371f6dfbcddc33fe1a390d1d174..8b7fe3fac88a1d2a4250becd1b9df4b7da64bca0 100644 (file)
@@ -123,7 +123,9 @@ list(APPEND LIBGROMACS_SOURCES ${THREAD_MPI_SOURCES})
 
 if(GMX_USE_TNG)
     list(APPEND LIBGROMACS_SOURCES ${TNG_SOURCES})
-    tng_set_source_properties(WITH_ZLIB ${HAVE_ZLIB})
+    if (NOT GMX_EXTERNAL_TNG)
+        tng_set_source_properties(WITH_ZLIB ${HAVE_ZLIB})
+    endif()
 endif()
 
 get_lmfit_properties(LMFIT_SOURCES LMFIT_LIBRARIES_TO_LINK LMFIT_INCLUDE_DIRECTORY LMFIT_INCLUDE_DIR_ORDER)