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