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 /* SSE2 instructions available */
122 #cmakedefine GMX_X86_SSE2
123
124 /* SSE4.1 instructions available */
125 #cmakedefine GMX_X86_SSE4_1
126
127 /* AVX 128-bit FMA instructions available */
128 #cmakedefine GMX_X86_AVX_128_FMA
129
130 /* AVX 256-bit instructions available */
131 #cmakedefine GMX_X86_AVX_256
132
133 /* SSE2 was selected as CPU acceleration level */
134 #cmakedefine GMX_CPU_ACCELERATION_X86_SSE2
135
136 /* SSE4.1 was selected as CPU acceleration level */
137 #cmakedefine GMX_CPU_ACCELERATION_X86_SSE4_1
138
139 /* AVX 128-bit FMA was selected as CPU acceleration level */
140 #cmakedefine GMX_CPU_ACCELERATION_X86_AVX_128_FMA
141
142 /* AVX 256-bit was selected as CPU acceleration level */
143 #cmakedefine GMX_CPU_ACCELERATION_X86_AVX_256
144
145 /* String for CPU acceleration choice (for writing to log files and stdout) */
146 #define GMX_CPU_ACCELERATION_STRING "@GMX_CPU_ACCELERATION@"
147
148 /* Integer byte order is big endian. */
149 #cmakedefine GMX_INTEGER_BIG_ENDIAN 
150
151 /* Use our own instead of system XDR libraries */
152 #cmakedefine GMX_INTERNAL_XDR
153
154 /* Use MPI (with mpicc) for parallelization */
155 #cmakedefine GMX_LIB_MPI
156
157 /* MPI_IN_PLACE exists for collective operations */
158 #cmakedefine MPI_IN_PLACE_EXISTS
159
160 /* Make a parallel version of GROMACS using message passing 
161    (MPI or thread_mpi) */
162 #cmakedefine GMX_MPI
163
164 /* Use threads_mpi for parallelization */
165 #cmakedefine GMX_THREAD_MPI
166
167 /* Use OpenMP multithreading */
168 #cmakedefine GMX_OPENMP
169
170 /* Ignore calls to nice(3) */
171 #cmakedefine GMX_NO_NICE
172
173 /* Ignore calls to system(3) */
174 #cmakedefine GMX_NO_SYSTEM
175
176 /* Use (modified) Gamess-UK for QM-MM calculations */
177 #cmakedefine GMX_QMMM_GAMESS
178
179 /* Use (modified) Gaussian0x for QM-MM calculations */
180 #cmakedefine GMX_QMMM_GAUSSIAN
181
182 /* Use (modified) Mopac 7 for QM-MM calculations */
183 #cmakedefine GMX_QMMM_MOPAC
184
185 /* Use the GROMACS software 1/sqrt(x) */
186 #cmakedefine GMX_SOFTWARE_INVSQRT
187
188 /* Use the PowerPC hardware 1/sqrt(x) */
189 #cmakedefine GMX_POWERPC_INVSQRT
190
191 /* Use sub-counters */
192 #cmakedefine GMX_CYCLE_SUBCOUNTERS
193
194 /* Compile with plugin support */
195 #cmakedefine GMX_USE_PLUGINS
196
197 /* Fallback path for VMD plug-ins */
198 #define GMX_VMD_PLUGIN_PATH "@GMX_VMD_PLUGIN_PATH@"
199
200 /* Define when pthreads are used */
201 #cmakedefine THREAD_PTHREADS
202
203 /* Define when Windows threads are used */
204 #cmakedefine THREAD_WINDOWS
205
206 /* Define when thread-MPI atomic operations are available */
207 #cmakedefine TMPI_ATOMICS
208
209 /* Define for busy wait option  */
210 #cmakedefine TMPI_WAIT_FOR_NO_ONE
211
212 /* Define for copy buffer option */
213 #cmakedefine TMPI_COPY_BUFFER
214
215 /* Define for profiling option */
216 #cmakedefine TMPI_PROFILE
217
218 /* Define for Linux pthread_setaffinity */
219 #cmakedefine HAVE_PTHREAD_SETAFFINITY
220
221 /* Define for sysconf() */
222 #cmakedefine HAVE_SYSCONF
223
224 /* Enable x86 gcc inline assembly */
225 #cmakedefine GMX_X86_GCC_INLINE_ASM
226
227 /* Use GPU native acceleration */
228 #cmakedefine GMX_GPU
229
230 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
231 #cmakedefine HAVE_FSEEKO
232
233 /* Define to 1 if _fseeki64 (and presumably _fseeki64) exists and is declared. */
234 #cmakedefine HAVE__FSEEKI64
235
236 /* Define to 1 if you have the gsl library (-lgsl). */
237 #cmakedefine HAVE_LIBGSL
238
239 /* Have io.h (windows)*/
240 #cmakedefine HAVE_IO_H
241
242 /* Define to 1 if you have the strdup() function. */
243 #cmakedefine HAVE_STRDUP
244
245 /* Define to 1 if you have the posix_memalign() function. */
246 #cmakedefine HAVE_POSIX_MEMALIGN
247
248 /* Define to 1 if you have the memalign() function. */
249 #cmakedefine HAVE_MEMALIGN
250
251 /* Define to 1 if you have the MSVC _aligned_malloc() function. */
252 #cmakedefine HAVE__ALIGNED_MALLOC
253
254 /* Define to 1 if you have the gettimeofday() function. */
255 #cmakedefine HAVE_GETTIMEOFDAY
256
257 /* Define to 1 if you have the cbrt() function. */
258 #cmakedefine HAVE_CBRT
259
260 /* Define to 1 if you have the isfinite() function. */
261 #cmakedefine HAVE_ISFINITE
262
263 /* Define to 1 if you have the _isfinite() function. */
264 #cmakedefine HAVE__ISFINITE
265
266 /* Define to 1 if you have the _finite() function. */
267 #cmakedefine HAVE__FINITE
268
269 /* Define to 1 if you have the fsync() function. */
270 #cmakedefine HAVE_FSYNC
271
272 /* Define to 1 if you have the Windows _commit() function. */
273 #cmakedefine HAVE__COMMIT
274
275 /* Define to 1 if you have the fileno() function. */
276 #cmakedefine HAVE_FILENO
277
278 /* Define to 1 if you have the _fileno() function. */
279 #cmakedefine HAVE__FILENO
280
281 /* Define to 1 if you have the lstat() function. */
282 #cmakedefine HAVE_LSTAT
283
284 /* Define to 1 if you have the sigaction() function. */
285 #cmakedefine HAVE_SIGACTION
286
287 /* Define to 1 if you have the rsqrt() function. */
288 #cmakedefine HAVE_RSQRT
289
290 /* Define to 1 if you have the rsqrtf() function. */
291 #cmakedefine HAVE_RSQRTF
292
293 /* Define to 1 if you have the sqrtf() function. */
294 #cmakedefine HAVE_SQRTF
295
296 /* Define to 1 if yo have the <unistd.h> header file. */
297 #cmakedefine HAVE_UNISTD_H
298
299 /* Define to 1 if yo have the <pwd.h> header file. */
300 #cmakedefine HAVE_PWD_H
301
302 /* Define to 1 if yo have the <pthread.h> header file. */
303 #cmakedefine HAVE_PTHREAD_H
304
305 /* Define to 1 if yo have the <dirent.h> header file. */
306 #cmakedefine HAVE_DIRENT_H
307
308 /* Define to 1 if you have the <sys/time.h> header file. */
309 #cmakedefine HAVE_SYS_TIME_H
310
311 /* Define to 1 if you have the <x86intrin.h> header file */
312 #cmakedefine HAVE_X86INTRIN_H
313
314 /* Define to 1 if you have the <intrin.h> header file */
315 #cmakedefine HAVE_INTRIN_H
316
317 /* Define to 1 if you have the <sched.h> header */
318 #cmakedefine HAVE_SCHED_H
319
320 /* Define to 1 if you have the POSIX <regex.h> header file. */
321 #cmakedefine HAVE_POSIX_REGEX
322
323 /* Define to 1 if you have the C++11 <regex> header file. */
324 #cmakedefine HAVE_CXX11_REGEX
325
326 /* Define to 1 if you have the sysconf() function */
327 #cmakedefine HAVE_SYSCONF
328
329 /* Define to 1 if you have the sched_getaffinity() function */
330 #cmakedefine HAVE_SCHED_GETAFFINITY
331
332 /* Define to 1 if you have the sched_setaffinity() function */
333 #cmakedefine HAVE_SCHED_SETAFFINITY
334
335 /* Bytes in IEEE fp word are in big-endian order if set, little-endian if not.
336    Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
337 #cmakedefine GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER
338
339 /* The two words in a double precision variable are in b ig-endian order if
340    set, little-endian if not. Do NOT assume this is the same as the byte
341    order! Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
342 #cmakedefine GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
343
344 /* Define if SIGUSR1 is present */
345 #cmakedefine HAVE_SIGUSR1
346
347 /* The size of int, as computed by sizeof. */
348 #cmakedefine SIZEOF_INT @SIZEOF_INT@
349
350 /* The size of long int, as computed by sizeof. */
351 #cmakedefine SIZEOF_LONG_INT @SIZEOF_LONG_INT@
352
353 /* The size of long long int, as computed by sizeof. */
354 #cmakedefine SIZEOF_LONG_LONG_INT @SIZEOF_LONG_LONG_INT@
355
356 /* The size of off_t, as computed by sizeof. */
357 #cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
358
359 /* The size of void*, as computed by sizeof. */
360 #cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
361
362 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
363 #cmakedefine _LARGEFILE_SOURCE
364
365 /* Define for large files, on AIX-style hosts. */
366 #cmakedefine _LARGE_FILES
367
368 /* Some systems requires this to be set to 64 for large file support */
369 #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
370
371 /* Define to __inline__ or __inline if that is what the C compiler
372    calls it, or to nothing if inline is not supported under any name.
373    Please do NOT remove the gmx_inline keyword from here. The classical
374    C++ inline keyword is merely a recommendation to the compiler, and
375    many compilers support stronger alternatives (e.g. __forceinline)
376    that we might want to use. */
377 #define gmx_inline ${INLINE_KEYWORD}
378 #ifndef __cplusplus
379 #define inline ${INLINE_KEYWORD}
380 #endif
381
382 /* Define to __restrict__ or __restrict if that is what the C compiler
383    calls it, unless we are on C99 when it is simply called restrict.
384    Since restrict is a reserved key word in C99 we are not allowed to
385    redefine the word itself, so call this gmx_restrict to avoid having
386    to identify the language standard level. If it is not supported, it
387    is still defined to an empty string here. */
388 #define gmx_restrict ${RESTRICT_KEYWORD}
389 /* Build special-purpose mdrun library */
390 #cmakedefine GMX_FAHCORE   
391
392 #ifdef GMX_FAHCORE
393 #define FULLINDIRECT 1
394 #define USE_FAH_XDR  1
395 #include "swindirect.h"
396 #endif
397
398 /* Define if we have pipes */
399 #cmakedefine HAVE_PIPES
400
401 /* Catch stupid CMake problems on OS X */
402 #ifdef __APPLE__
403 #  if ((defined(__LP64__) && __LP64__ && defined(SIZEOF_VOIDP) && SIZEOF_VOIDP<8) || ( (!defined(__LP64__) || __LP64__==0) && (defined(SIZEOF_VOIDP) && SIZEOF_VOIDP>4)))
404 #    error "Inconsistency between current OS X architecture and the one used to generate original" 
405 #    error "CMake configuration. This is probably caused by starting CMake with the default value"
406 #    error "for CMAKE_OSX_ARCHITECTURES (blank), and then changing it. In this case all the tests"
407 #    error "will have been performed with the original (now incorrect) architecture."
408 #    error "To fix this, set CMAKE_OSX_ARCHITECTURES on the _command_line_ before starting CMake,"
409 #    error "or create a new such entry with your choice in the GUI _before_ hitting 'configure'."
410 #  endif
411 #endif
412
413 /*! \endcond */