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