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