Merge release-4-6 into master
[alexxy/gromacs.git] / src / config.h.cmakein
1 /*! \libinternal \file
2  * \brief
3  * Include file for configuration macros from the build system.
4  *
5  * This header is not installed, so headers must not reference macros defined
6  * here.
7  *
8  * \inlibraryapi
9  */
10 #include "gromacs/utility/gmx_header_config.h"
11
12 /* TODO: For now, disable Doxygen warnings from here */
13 /*! \cond */
14
15 /* Disable warnings about double-to-float conversion accuracy loss on MSVC */
16 #ifdef _MSC_VER
17 #pragma warning (disable : 4305)
18 #pragma warning (disable : 4244)
19 #pragma warning (disable : 4101)
20 #pragma warning (disable : 4996)
21 #pragma warning (disable : 4267)
22 #pragma warning (disable : 4090)
23 #endif
24
25 /* Name of package (translate from cmake to autoconf macro name) */
26 #define PACKAGE  "@PROJECT_NAME@"
27
28 /* Version number of package (translate from cmake to autoconf macro name) */
29 #define VERSION  "@PROJECT_VERSION@"
30
31 /* Use extra version information generated with git */
32 #cmakedefine GMX_GIT_VERSION_INFO
33
34 /* Default location of data files */
35 #define GMXLIBDIR "@GMXLIBDIR@"
36
37 /* Hardware and OS version for build host */
38 #define BUILD_HOST "@BUILD_HOST@"
39
40 /* CPU information for build host */
41 #define BUILD_CPU_VENDOR "@BUILD_CPU_VENDOR@"
42
43 #define BUILD_CPU_BRAND "@BUILD_CPU_BRAND@"
44
45 #define BUILD_CPU_FAMILY @BUILD_CPU_FAMILY@
46
47 #define BUILD_CPU_MODEL @BUILD_CPU_MODEL@
48
49 #define BUILD_CPU_STEPPING @BUILD_CPU_STEPPING@
50
51 #define BUILD_CPU_FEATURES "@BUILD_CPU_FEATURES@"
52
53 /* Compiler and CFLAGS from build */
54 #define BUILD_COMPILER "@BUILD_COMPILER@"
55
56 #define BUILD_CFLAGS   "@BUILD_CFLAGS@"
57
58 /* Date and time for build */
59 #define BUILD_TIME "@BUILD_TIME@"
60
61 /* User doing build */
62 #define BUILD_USER "@BUILD_USER@"
63
64 /* Binary suffix for the created binaries */
65 #define GMX_BINARY_SUFFIX "@GMX_BINARY_SUFFIX@"
66
67 /* Source directory for the build */
68 #cmakedefine CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@"
69
70 /* Binary directory for the build */
71 #cmakedefine CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@"
72
73 /* Turn off water-water neighborlist optimization only - not used right now */
74 #cmakedefine DISABLE_WATERWATER_NLIST
75
76 /* Turn off all water neighborlist optimization - not used right now */
77 #cmakedefine DISABLE_WATER_NLIST
78
79 /* Fortran support */
80 #cmakedefine GMX_FORTRAN
81
82 /* Define to a macro mangling the given C identifier (in lower and upper
83    case), which must not contain underscores, for linking with Fortran. */
84 #define F77_FUNC(name,NAME)     @F77_FUNCDEF@
85
86 /* IEEE754 floating-point format. Memory layout is defined by macros
87  * GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER and GMX_IEEE754_BIG_ENDIAN_WORD_ORDER. 
88  */
89 #cmakedefine GMX_FLOAT_FORMAT_IEEE754
90
91 /* Use assembly intrinsics kernels for BlueGene */
92 #cmakedefine GMX_BLUEGENE
93
94 /* Power6 acceleration */
95 #cmakedefine GMX_POWER6
96
97 /* Work around broken calloc() */
98 #cmakedefine GMX_BROKEN_CALLOC
99
100 /* Enable special hacks for Cray XT3 */
101 #cmakedefine GMX_CRAY_XT3
102
103 /* Do not optimize FFTW setups (not needed with SSE FFT kernels) */
104 #cmakedefine GMX_DISABLE_FFTW_MEASURE
105
106 /* Compile in double precision */
107 #cmakedefine GMX_DOUBLE
108
109 /* Use Built-in FFTPACK FFT library */
110 #cmakedefine GMX_FFT_FFTPACK
111
112 /* Use FFTW3 FFT library */
113 #cmakedefine GMX_FFT_FFTW3
114
115 /* Use Intel MKL FFT library */
116 #cmakedefine GMX_FFT_MKL
117
118 /* Use AMD core math library */
119 #cmakedefine GMX_FFT_ACML
120
121 /* What type of acceleration is used? (string, for dumping to files) */
122 #define GMX_ACCELERATION "@GMX_ACCELERATION@"
123
124 /* SSE2 acceleration */
125 #cmakedefine GMX_X86_SSE2
126
127 /* SSE4.1 acceleration */
128 #cmakedefine GMX_X86_SSE4_1
129
130 /* AVX 128-bit acceleration with FMA, useful on modern AMD hardware */
131 #cmakedefine GMX_X86_AVX_128_FMA
132
133 /* AVX 256-bit acceleration, usually for intel hardware */
134 #cmakedefine GMX_X86_AVX_256
135
136 /* Integer byte order is big endian. */
137 #cmakedefine GMX_INTEGER_BIG_ENDIAN 
138
139 /* Use our own instead of system XDR libraries */
140 #cmakedefine GMX_INTERNAL_XDR
141
142 /* Use MPI (with mpicc) for parallelization */
143 #cmakedefine GMX_LIB_MPI
144
145 /* MPI_IN_PLACE exists for collective operations */
146 #cmakedefine MPI_IN_PLACE_EXISTS
147
148 /* Make a parallel version of GROMACS using message passing 
149    (MPI or thread_mpi) */
150 #cmakedefine GMX_MPI
151
152 /* Use threads_mpi for parallelization */
153 #cmakedefine GMX_THREAD_MPI
154
155 /* Use OpenMP multithreading */
156 #cmakedefine GMX_OPENMP
157
158 /* Ignore calls to nice(3) */
159 #cmakedefine GMX_NO_NICE
160
161 /* Ignore calls to system(3) */
162 #cmakedefine GMX_NO_SYSTEM
163
164 /* Use (modified) Gamess-UK for QM-MM calculations */
165 #cmakedefine GMX_QMMM_GAMESS
166
167 /* Use (modified) Gaussian0x for QM-MM calculations */
168 #cmakedefine GMX_QMMM_GAUSSIAN
169
170 /* Use (modified) Mopac 7 for QM-MM calculations */
171 #cmakedefine GMX_QMMM_MOPAC
172
173 /* Use the GROMACS software 1/sqrt(x) */
174 #cmakedefine GMX_SOFTWARE_INVSQRT
175
176 /* Use the PowerPC hardware 1/sqrt(x) */
177 #cmakedefine GMX_POWERPC_INVSQRT
178
179 /* Use sub-counters */
180 #cmakedefine GMX_CYCLE_SUBCOUNTERS
181
182 /* Compile with plugin support */
183 #cmakedefine GMX_USE_PLUGINS
184
185 /* Fallback path for VMD plug-ins */
186 #define GMX_VMD_PLUGIN_PATH "@GMX_VMD_PLUGIN_PATH@"
187
188 /* Define when pthreads are used */
189 #cmakedefine THREAD_PTHREADS
190
191 /* Define when Windows threads are used */
192 #cmakedefine THREAD_WINDOWS
193
194 /* Define when thread-MPI atomic operations are available */
195 #cmakedefine TMPI_ATOMICS
196
197 /* Define for busy wait option  */
198 #cmakedefine TMPI_WAIT_FOR_NO_ONE
199
200 /* Define for copy buffer option */
201 #cmakedefine TMPI_COPY_BUFFER
202
203 /* Define for profiling option */
204 #cmakedefine TMPI_PROFILE
205
206 /* Define for Linux pthread_setaffinity */
207 #cmakedefine HAVE_PTHREAD_SETAFFINITY
208
209 /* Define for sysconf() */
210 #cmakedefine HAVE_SYSCONF
211
212 /* Enable x86 gcc inline assembly */
213 #cmakedefine GMX_X86_GCC_INLINE_ASM
214
215 /* Use GPU native acceleration */
216 #cmakedefine GMX_GPU
217
218 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
219 #cmakedefine HAVE_FSEEKO
220
221 /* Define to 1 if _fseeki64 (and presumably _fseeki64) exists and is declared. */
222 #cmakedefine HAVE__FSEEKI64
223
224 /* Define to 1 if you have the gsl library (-lgsl). */
225 #cmakedefine HAVE_LIBGSL
226
227 /* Have io.h (windows)*/
228 #cmakedefine HAVE_IO_H
229
230 /* Define to 1 if you have the strdup() function. */
231 #cmakedefine HAVE_STRDUP
232
233 /* Define to 1 if you have the posix_memalign() function. */
234 #cmakedefine HAVE_POSIX_MEMALIGN
235
236 /* Define to 1 if you have the memalign() function. */
237 #cmakedefine HAVE_MEMALIGN
238
239 /* Define to 1 if you have the MSVC _aligned_malloc() function. */
240 #cmakedefine HAVE__ALIGNED_MALLOC
241
242 /* Define to 1 if you have the gettimeofday() function. */
243 #cmakedefine HAVE_GETTIMEOFDAY
244
245 /* Define to 1 if you have the cbrt() function. */
246 #cmakedefine HAVE_CBRT
247
248 /* Define to 1 if you have the isfinite() function. */
249 #cmakedefine HAVE_ISFINITE
250
251 /* Define to 1 if you have the _isfinite() function. */
252 #cmakedefine HAVE__ISFINITE
253
254 /* Define to 1 if you have the _finite() function. */
255 #cmakedefine HAVE__FINITE
256
257 /* Define to 1 if you have the fsync() function. */
258 #cmakedefine HAVE_FSYNC
259
260 /* Define to 1 if you have the Windows _commit() function. */
261 #cmakedefine HAVE__COMMIT
262
263 /* Define to 1 if you have the fileno() function. */
264 #cmakedefine HAVE_FILENO
265
266 /* Define to 1 if you have the _fileno() function. */
267 #cmakedefine HAVE__FILENO
268
269 /* Define to 1 if you have the lstat() function. */
270 #cmakedefine HAVE_LSTAT
271
272 /* Define to 1 if you have the sigaction() function. */
273 #cmakedefine HAVE_SIGACTION
274
275 /* Define to 1 if you have the rsqrt() function. */
276 #cmakedefine HAVE_RSQRT
277
278 /* Define to 1 if you have the rsqrtf() function. */
279 #cmakedefine HAVE_RSQRTF
280
281 /* Define to 1 if you have the sqrtf() function. */
282 #cmakedefine HAVE_SQRTF
283
284 /* Define to 1 if yo have the <unistd.h> header file. */
285 #cmakedefine HAVE_UNISTD_H
286
287 /* Define to 1 if yo have the <pwd.h> header file. */
288 #cmakedefine HAVE_PWD_H
289
290 /* Define to 1 if yo have the <pthread.h> header file. */
291 #cmakedefine HAVE_PTHREAD_H
292
293 /* Define to 1 if yo have the <dirent.h> header file. */
294 #cmakedefine HAVE_DIRENT_H
295
296 /* Define to 1 if you have the <sys/time.h> header file. */
297 #cmakedefine HAVE_SYS_TIME_H
298
299 /* Define to 1 if you have the <x86intrin.h> header file */
300 #cmakedefine HAVE_X86INTRIN_H
301
302 /* Define to 1 if you have the <intrin.h> header file */
303 #cmakedefine HAVE_INTRIN_H
304
305 /* Define to 1 if you have the <sched.h> header */
306 #cmakedefine HAVE_SCHED_H
307
308 /* Define to 1 if you have the POSIX <regex.h> header file. */
309 #cmakedefine HAVE_POSIX_REGEX
310
311 /* Define to 1 if you have the C++11 <regex> header file. */
312 #cmakedefine HAVE_CXX11_REGEX
313
314 /* Define to 1 if you have the sysconf() function */
315 #cmakedefine HAVE_SYSCONF
316
317 /* Define to 1 if you have the sched_getaffinity() function */
318 #cmakedefine HAVE_SCHED_GETAFFINITY
319
320 /* Define to 1 if you have the sched_setaffinity() function */
321 #cmakedefine HAVE_SCHED_SETAFFINITY
322
323 /* Bytes in IEEE fp word are in big-endian order if set, little-endian if not.
324    Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
325 #cmakedefine GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER
326
327 /* The two words in a double precision variable are in b ig-endian order if
328    set, little-endian if not. Do NOT assume this is the same as the byte
329    order! Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
330 #cmakedefine GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
331
332 /* Define if SIGUSR1 is present */
333 #cmakedefine HAVE_SIGUSR1
334
335 /* The size of int, as computed by sizeof. */
336 #cmakedefine SIZEOF_INT @SIZEOF_INT@
337
338 /* The size of long int, as computed by sizeof. */
339 #cmakedefine SIZEOF_LONG_INT @SIZEOF_LONG_INT@
340
341 /* The size of long long int, as computed by sizeof. */
342 #cmakedefine SIZEOF_LONG_LONG_INT @SIZEOF_LONG_LONG_INT@
343
344 /* The size of off_t, as computed by sizeof. */
345 #cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
346
347 /* The size of void*, as computed by sizeof. */
348 #cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
349
350 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
351 #cmakedefine _LARGEFILE_SOURCE
352
353 /* Define for large files, on AIX-style hosts. */
354 #cmakedefine _LARGE_FILES
355
356 /* Some systems requires this to be set to 64 for large file support */
357 #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
358
359 /* Define to __inline__ or __inline if that is what the C compiler
360    calls it, or to nothing if inline is not supported under any name.
361    Please do NOT remove the gmx_inline keyword from here. The classical
362    C++ inline keyword is merely a recommendation to the compiler, and
363    many compilers support stronger alternatives (e.g. __forceinline)
364    that we might want to use. */
365 #define gmx_inline ${INLINE_KEYWORD}
366 #ifndef __cplusplus
367 #define inline ${INLINE_KEYWORD}
368 #endif
369
370 /* Define to __restrict__ or __restrict if that is what the C compiler
371    calls it, unless we are on C99 when it is simply called restrict.
372    Since restrict is a reserved key word in C99 we are not allowed to
373    redefine the word itself, so call this gmx_restrict to avoid having
374    to identify the language standard level. If it is not supported, it
375    is still defined to an empty string here. */
376 #define gmx_restrict ${RESTRICT_KEYWORD}
377 /* Build special-purpose mdrun library */
378 #cmakedefine GMX_FAHCORE   
379
380 #ifdef GMX_FAHCORE
381 #define FULLINDIRECT 1
382 #define USE_FAH_XDR  1
383 #include "swindirect.h"
384 #endif
385
386 /* Define if we have pipes */
387 #cmakedefine HAVE_PIPES
388
389 /* Catch stupid CMake problems on OS X */
390 #ifdef __APPLE__
391 #  if ((defined(__LP64__) && __LP64__ && defined(SIZEOF_VOIDP) && SIZEOF_VOIDP<8) || ( (!defined(__LP64__) || __LP64__==0) && (defined(SIZEOF_VOIDP) && SIZEOF_VOIDP>4)))
392 #    error "Inconsistency between current OS X architecture and the one used to generate original" 
393 #    error "CMake configuration. This is probably caused by starting CMake with the default value"
394 #    error "for CMAKE_OSX_ARCHITECTURES (blank), and then changing it. In this case all the tests"
395 #    error "will have been performed with the original (now incorrect) architecture."
396 #    error "To fix this, set CMAKE_OSX_ARCHITECTURES on the _command_line_ before starting CMake,"
397 #    error "or create a new such entry with your choice in the GUI _before_ hitting 'configure'."
398 #  endif
399 #endif
400
401 /*! \endcond */