Remove unused defines from config.h, part 3.
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 20 May 2012 18:33:01 +0000 (21:33 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sun, 20 May 2012 19:07:12 +0000 (22:07 +0300)
- C89 defines size_t in stddef.h, even for free-standing
  implementations, we probably don't need to define our own fallback
  (and it probably doesn't work in any case).
- F77_FUNC_, the underscored version is not used anywhere.  Left it's
  definition in CMakeLists.txt as commented.
- TMPI_WINDOWS_NUMA_API, not used in source files nor in CMake.
- HAVE_LIBM and GMX_LARGEFILES, not used in any source file.
- HAVE_?MMINTRIN_H, not used anywhere.
- restrict, not used anywhere, and the check was broken.

Change-Id: Icc5bba87973c7a086a01be486a5785faee4c5cad

CMakeLists.txt
cmake/TestRestrict.c [deleted file]
cmake/ThreadMPI.cmake
cmake/gmxTestRestrict.cmake [deleted file]
src/config.h.cmakein

index 1051420aacb96e5036f03c057433d97790cc5209..bb6dad6122ac03dfddfd2ebcc4fe70e98f4837c3 100644 (file)
@@ -286,11 +286,6 @@ check_include_files(dirent.h     HAVE_DIRENT_H)
 check_include_files(regex.h      HAVE_REGEX_H)
 check_include_files(sys/types.h  HAVE_SYS_TYPES_H)
 check_include_files(sys/time.h   HAVE_SYS_TIME_H)
-# SSE support
-check_include_files(xmmintrin.h  HAVE_XMMINTRIN_H)
-check_include_files(emmintrin.h  HAVE_EMMINTRIN_H)
-check_include_files(pmmintrin.h  HAVE_PMMINTRIN_H)
-check_include_files(smmintrin.h  HAVE_SMMINTRIN_H)
 check_include_files(io.h                HAVE_IO_H)
 
 
@@ -536,9 +531,6 @@ gmx_test_sigusr1(HAVE_SIGUSR1)
 include(gmxTestInline)
 gmx_test_inline(INLINE_KEYWORD)
 
-include(gmxTestRestrict)
-gmx_test_inline(RESTRICT_KEYWORD)
-
 include(gmxTestPipes)
 gmx_test_pipes(HAVE_PIPES)
 
@@ -615,13 +607,6 @@ elseif(${GMX_ACCELERATION} STREQUAL "SSE")
       endif()
     endif()
 
-#    if(HAVE_PMMINTRIN_H)
-#        set(GMX_SSE3 1)
-#    endif(HAVE_PMMINTRIN_H)
-#    if(HAVE_SMMINTRIN_H)
-#        set(GMX_SSE4_1 1)
-#    endif(HAVE_SMMINTRIN_H)
-
 elseif(${GMX_ACCELERATION} STREQUAL "FORTRAN")
     set(GMX_FORTRAN 1)
     #these are switch on by default sometimes
@@ -684,14 +669,15 @@ if(GMX_FORTRAN OR GMX_POWER6)
 
     if(isupper)
         set(F77_FUNCDEF   "${prefix} NAME ${suffix}")
-        set(F77_FUNCDEF_  "${prefix} NAME ${extrasuffix}")
+        # The underscored versions are not currently used.
+        #set(F77_FUNCDEF_  "${prefix} NAME ${extrasuffix}")
     else(isupper)
         set(F77_FUNCDEF   "${prefix} name ${suffix}")
-        set(F77_FUNCDEF_  "${prefix} name ${extrasuffix}")
+        #set(F77_FUNCDEF_  "${prefix} name ${extrasuffix}")
     endif(isupper)
 else(GMX_FORTRAN OR GMX_POWER6)
         set(F77_FUNCDEF   "name ## _")
-        set(F77_FUNCDEF_  "name ## _")
+        #set(F77_FUNCDEF_  "name ## _")
 endif(GMX_FORTRAN OR GMX_POWER6)
 
 # Process QM/MM Settings
diff --git a/cmake/TestRestrict.c b/cmake/TestRestrict.c
deleted file mode 100644 (file)
index 81ebf22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-int foo(int * TESTRESTRICTDEF i, int * TESTRESTRICTDEF j){return *i+*j;}
-int main(int argc, char *argv[]){ int i=0; int j=0; return foo(&i,&j); }
index 43090fc7746999db89b40da0b68ca3ad5b6806c0..9bcd978b73803dcb5ebbe257a05f81da23020c5c 100644 (file)
@@ -94,18 +94,6 @@ endif (THREAD_MPI_PROFILING)
 
 include(CheckCSourceCompiles)
 
-# Windows NUMA allocator
-if (THREAD_WINDOWS)
-       check_c_source_compiles(
-       "#include <windows.h>
-       int main(void) { PROCESSOR_NUMBER a; return 0; }"
-       HAVE_PROCESSOR_NUMBER)
-       if(HAVE_PROCESSOR_NUMBER)
-            #add_definitions(-DTMPI_WINDOWS_NUMA_API)
-            set(TMPI_WINDOWS_NUMA_API 1)
-       endif(HAVE_PROCESSOR_NUMBER)
-endif(THREAD_WINDOWS)
-
 # option to set affinity 
 option(THREAD_MPI_SET_AFFINITY "Set thread affinity to a core if number of threads equal to number of hardware threads." ON)
 mark_as_advanced(THREAD_MPI_SET_AFFINITY)
diff --git a/cmake/gmxTestRestrict.cmake b/cmake/gmxTestRestrict.cmake
deleted file mode 100644 (file)
index d2bc2b5..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# - Define macro to check restrict keyword
-#
-#  GMX_TEST_RESTRICT(VARIABLE)
-#
-#  VARIABLE will be set to the keyword
-#
-#  Remember to have a cmakedefine for it too...
-
-MACRO(GMX_TEST_RESTRICT VARIABLE)
-    IF(NOT DEFINED TEST_${VARIABLE})
-
-        MESSAGE(STATUS "Checking for restrict keyword")
-
-# Start with __restrict__, since that is the C++ default keyword.
-       FOREACH(KEYWORD "__restrict__" "__restrict" "restrict")
-            IF(NOT TEST_${VARIABLE})
-                TRY_COMPILE(TEST_${VARIABLE} "${CMAKE_BINARY_DIR}"    
-                            "${CMAKE_SOURCE_DIR}/cmake/TestRestrict.c"
-                            COMPILE_DEFINITIONS "-DTESTRESTRICTDEF=${KEYWORD}" )
-                SET(CHK_RESTRICT_KEYWORD ${KEYWORD})
-            ENDIF(NOT TEST_${VARIABLE})
-        ENDFOREACH(KEYWORD)
-             
-        IF(TEST_${VARIABLE})
-            SET(${VARIABLE} ${KEYWORD})
-            MESSAGE(STATUS "Checking for restrict keyword - ${CHK_RESTRICT_KEYWORD}")
-        ELSE(TEST_${VARIABLE})
-           SET(${VARIABLE} " ")
-            MESSAGE(STATUS "Checking for restrict keyword - not found")
-        ENDIF(TEST_${VARIABLE})
-
-    ENDIF(NOT DEFINED TEST_${VARIABLE})        
-ENDMACRO(GMX_TEST_RESTRICT VARIABLE)
-
-
-
-
index fec43e2a13328c2eb255cf15cba5ae620c4bd124..69b9b8ca1534398567159a0314bd0467aa5bacd8 100644 (file)
@@ -47,9 +47,6 @@
    case), which must not contain underscores, for linking with Fortran. */
 #define F77_FUNC(name,NAME)     @F77_FUNCDEF@
 
-/* As F77_FUNC, but for C identifiers containing underscores. */
-#define F77_FUNC_(name,NAME)    @F77_FUNCDEF_@
-
 /* IEEE754 floating-point format. Memory layout is defined by macros
  * GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER and GMX_IEEE754_BIG_ENDIAN_WORD_ORDER. 
  */
 /* Define for Linux pthread_setaffinity */
 #cmakedefine HAVE_PTHREAD_SETAFFINITY
 
-/* Define for Windows NUMA-aware allocator functions*/
-#cmakedefine TMPI_WINDOWS_NUMA_API
-
 /* Define for sysconf() */
 #cmakedefine HAVE_SYSCONF
 
 /* Define to 1 if _fseeki64 (and presumably _fseeki64) exists and is declared. */
 #cmakedefine HAVE__FSEEKI64
 
-/* Define to 1 if you have the m library (-lm). */
-#cmakedefine HAVE_LIBM
-
 /* Define to 1 if you have the gsl library (-lgsl). */
 #cmakedefine HAVE_LIBGSL
 
 /* Define to 1 if you have the <sys/time.h> header file. */
 #cmakedefine HAVE_SYS_TIME_H
 
-/* Define to 1 if yo have the <xmmintrin.h> header file. */
-#cmakedefine HAVE_XMMINTRIN_H
-
-/* Define to 1 if yo have the <emmintrin.h> header file. */
-#cmakedefine HAVE_EMMINTRIN_H
-
-/* Define to 1 if yo have the <pmmintrin.h> header file. */
-#cmakedefine HAVE_PMMINTRIN_H
-
-/* Define to 1 if yo have the <smmintrin.h> header file. */
-#cmakedefine HAVE_SMMINTRIN_H
-
 /* Define for sched.h (this is for thread_mpi)*/
 #define HAVE_SCHED_H
 
 /* Some systems requires this to be set to 64 for large file support */
 #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
 
-/* Gromacs shortcut define for fseeko & ftello being present with 64-bit support */
-#cmakedefine GMX_LARGEFILES
-
 /* Define to int if <sys/types.h> does not define. */
 #cmakedefine gid_t int
 
 #define inline ${INLINE_KEYWORD}
 #endif
 
-/* Define to __restrict__ or __restrict if that is what the C compiler
-   calls it, or to nothing if restrict is not supported under any name.  */
-#define restrict ${RESTRICT_KEYWORD}
-
 /* Define to long int if <sys/types.h> does not define. */                    
 #cmakedefine off_t int                                                                
-                                                                                
-/* Define to unsigned int if <sys/types.h> does not define. */
-#cmakedefine size_t int                                                                
 
 /* Define to int if <sys/types.h> does not define. */
 #cmakedefine uid_t int