CMake improvements
authorChristoph Junghans <junghans@votca.org>
Fri, 13 Jan 2012 18:00:13 +0000 (11:00 -0700)
committerMark Abraham <mark.j.abraham@gmail.com>
Sat, 14 Jan 2012 04:41:03 +0000 (15:41 +1100)
* make CMake quiet again, when running for the second time
* remember that VMD was found before
* removed duplicate definition of HAVE_FSEEKO

Change-Id: If2a2cc600fd14e67c6169e12172e7c5aa8ebedfc

CMakeLists.txt
cmake/gmxTestLargeFiles.cmake

index 3527af3541f846ce500e45644683d40dc70bf761..e1d93bebb12c066b0b63a6f4950e9b3007d4875b 100644 (file)
@@ -165,13 +165,18 @@ if (GMX_DEFAULT_SUFFIX)
     set (GMX_LIBS_SUFFIX "_gpu")
   endif(GMX_OPENMM)
   mark_as_advanced(FORCE GMX_BINARY_SUFFIX GMX_LIBS_SUFFIX)
-  message(STATUS "Using default binary suffix: \"${GMX_BINARY_SUFFIX}\"")    
-  message(STATUS "Using default library suffix: \"${GMX_LIBS_SUFFIX}\"") 
+  if (NOT SUFFIX_QUIETLY)
+    message(STATUS "Using default binary suffix: \"${GMX_BINARY_SUFFIX}\"")
+    message(STATUS "Using default library suffix: \"${GMX_LIBS_SUFFIX}\"")
+  endif (NOT SUFFIX_QUIETLY)
 else(GMX_DEFAULT_SUFFIX)
   mark_as_advanced(CLEAR GMX_BINARY_SUFFIX GMX_LIBS_SUFFIX)
-  message(STATUS "Using manually set binary suffix: \"${GMX_BINARY_SUFFIX}\"")    
-  message(STATUS "Using manually set library suffix: \"${GMX_LIBS_SUFFIX}\"")
+  if (NOT SUFFIX_QUIETLY)
+    message(STATUS "Using manually set binary suffix: \"${GMX_BINARY_SUFFIX}\"")
+    message(STATUS "Using manually set library suffix: \"${GMX_LIBS_SUFFIX}\"")
+  endif (NOT SUFFIX_QUIETLY)
 endif(GMX_DEFAULT_SUFFIX)
+set(SUFFIX_QUIETLY TRUE CACHE INTERNAL "")
 
 set(PKG_CFLAGS "")
 if(GMX_DOUBLE)
@@ -821,7 +826,7 @@ if(GMX_LOAD_PLUGINS)
 
   # Test for unsuitable versions of VMD
 
-  if(VMD_FOUND)
+  if(VMD_FOUND AND NOT GMX_VMD_PLUGIN_PATH)
     message(STATUS "Checking for suitable VMD version")
     exec_program(${VMD_EXECUTABLE}
       ARGS --help
@@ -857,7 +862,9 @@ if(GMX_LOAD_PLUGINS)
 
   # so, should we use plug-ins?
   if((WIN32 AND NOT CYGWIN) OR (HAVE_DLOPEN AND BUILD_SHARED_LIBS))
-    MESSAGE(STATUS "Found the ability to use plug-ins when building shared libraries, so will compile to use plug-ins (e.g. to read VMD-supported file formats).")
+    if (NOT VMD_QUIETLY)
+      MESSAGE(STATUS "Found the ability to use plug-ins when building shared libaries, so will compile to use plug-ins (e.g. to read VMD-supported file formats).")
+    endif(NOT VMD_QUIETLY)
     set(GMX_USE_PLUGINS ON)
     list(APPEND GMX_EXTRA_LIBRARIES ${CMAKE_DL_LIBS}) # magic cross-platform pre-set variable for dlopen library
     set(PKG_DL_LIBS "-l${CMAKE_DL_LIBS}")
@@ -865,6 +872,7 @@ if(GMX_LOAD_PLUGINS)
     set(PKG_DL_LIBS)
   endif()
 endif(GMX_LOAD_PLUGINS)
+set(VMD_QUIETLY TRUE CACHE INTERNAL "")
 
 # Math and thread libraries must often come after all others when linking...
 if(HAVE_LIBM)
index 5a97bed65ec59ae8c0d69117816c2975da001f2e..601feda9437da46283b335bc40a98359db44bbc4 100644 (file)
@@ -7,7 +7,6 @@
 #  _LARGE_FILES
 #  _LARGEFILE_SOURCE
 #  _FILE_OFFSET_BITS 64  
-#  HAVE_FSEEKO
 #
 #  However, it is YOUR job to make sure these defines are set in a cmakedefine so they
 #  end up in a config.h file that is included in your source if necessary!
@@ -102,7 +101,6 @@ MACRO(GMX_TEST_LARGE_FILES VARIABLE)
 
            if(FSEEKO_COMPILE_OK)
                 SET(${VARIABLE} 1 CACHE INTERNAL "Result of test for large file support" FORCE)
-                set(HAVE_FSEEKO 1)
         else(FSEEKO_COMPILE_OK)
                        if (HAVE__FSEEKI64)
                                SET(${VARIABLE} 1 CACHE INTERNAL "Result of test for large file support" FORCE)