2006-04-12 01:59:08 +02:00
|
|
|
/**
|
|
|
|
* =========================================================================
|
|
|
|
* File : config.h
|
|
|
|
* Project : 0 A.D.
|
2008-01-19 12:33:11 +01:00
|
|
|
* Description : compile-time configuration for the entire project
|
2006-04-12 01:59:08 +02:00
|
|
|
* =========================================================================
|
|
|
|
*/
|
|
|
|
|
2007-05-07 18:33:24 +02:00
|
|
|
// license: GPL; see lib/license.txt
|
2006-04-12 01:59:08 +02:00
|
|
|
|
2007-05-07 18:33:24 +02:00
|
|
|
#ifndef INCLUDED_CONFIG
|
|
|
|
#define INCLUDED_CONFIG
|
2005-01-27 16:50:11 +01:00
|
|
|
|
2008-01-19 12:33:11 +01:00
|
|
|
// notes:
|
|
|
|
// - this file is included in the PCH and thus affects the entire project.
|
|
|
|
// to avoid unnecessary full rebuilds, place settings of more limited
|
|
|
|
// applicability in config2.h and explicitly include that header.
|
|
|
|
// - config macros are always defined; their values (1 or 0) are tested
|
|
|
|
// with #if instead of #ifdef. this protects against typos by at least
|
|
|
|
// causing a warning if the tested macro is undefined.
|
|
|
|
// - allow override via compiler settings by checking #ifndef.
|
2005-06-22 05:23:22 +02:00
|
|
|
|
2008-01-19 12:33:11 +01:00
|
|
|
// pre-compiled headers
|
|
|
|
#ifndef CONFIG_ENABLE_PCH
|
|
|
|
# define CONFIG_ENABLE_PCH 1 // improve build performance
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// frame pointers
|
2005-10-29 04:32:36 +02:00
|
|
|
#ifndef CONFIG_OMIT_FP
|
|
|
|
# ifdef NDEBUG
|
2008-01-19 12:33:11 +01:00
|
|
|
# define CONFIG_OMIT_FP 1 // improve performance
|
2005-10-29 04:32:36 +02:00
|
|
|
# else
|
2008-01-19 12:33:11 +01:00
|
|
|
# define CONFIG_OMIT_FP 0 // enable use of ia32's fast stack walk
|
2005-10-29 04:32:36 +02:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2008-01-19 12:33:11 +01:00
|
|
|
// try to prevent any exceptions from being thrown - even by the C++
|
|
|
|
// standard library. useful only for performance tests.
|
|
|
|
#ifndef CONFIG_DISABLE_EXCEPTIONS
|
|
|
|
# define CONFIG_DISABLE_EXCEPTIONS 0
|
2007-12-29 17:45:22 +01:00
|
|
|
#endif
|
|
|
|
|
2005-08-09 18:23:19 +02:00
|
|
|
// enable additional debug checks (very slow).
|
|
|
|
#ifndef CONFIG_PARANOIA
|
|
|
|
# define CONFIG_PARANOIA 0
|
|
|
|
#endif
|
|
|
|
|
2007-12-20 21:09:19 +01:00
|
|
|
// final release; disables some safety checks.
|
2006-04-10 08:44:54 +02:00
|
|
|
#ifndef CONFIG_FINAL
|
|
|
|
# define CONFIG_FINAL 0
|
|
|
|
#endif
|
|
|
|
|
2007-05-07 18:33:24 +02:00
|
|
|
#endif // #ifndef INCLUDED_CONFIG
|