2006-04-11 16:59:08 -07:00
|
|
|
/**
|
|
|
|
|
* =========================================================================
|
|
|
|
|
* File : config.h
|
|
|
|
|
* Project : 0 A.D.
|
2008-01-19 03:33:11 -08:00
|
|
|
* Description : compile-time configuration for the entire project
|
2006-04-11 16:59:08 -07:00
|
|
|
* =========================================================================
|
|
|
|
|
*/
|
|
|
|
|
|
2007-05-07 09:33:24 -07:00
|
|
|
// license: GPL; see lib/license.txt
|
2006-04-11 16:59:08 -07:00
|
|
|
|
2007-05-07 09:33:24 -07:00
|
|
|
#ifndef INCLUDED_CONFIG
|
|
|
|
|
#define INCLUDED_CONFIG
|
2005-01-27 07:50:11 -08:00
|
|
|
|
2008-01-19 03:33:11 -08: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-21 20:23:22 -07:00
|
|
|
|
2008-01-19 03:33:11 -08:00
|
|
|
// pre-compiled headers
|
|
|
|
|
#ifndef CONFIG_ENABLE_PCH
|
|
|
|
|
# define CONFIG_ENABLE_PCH 1 // improve build performance
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// frame pointers
|
2005-10-28 19:32:36 -07:00
|
|
|
#ifndef CONFIG_OMIT_FP
|
|
|
|
|
# ifdef NDEBUG
|
2008-01-19 03:33:11 -08:00
|
|
|
# define CONFIG_OMIT_FP 1 // improve performance
|
2005-10-28 19:32:36 -07:00
|
|
|
# else
|
2008-01-19 03:33:11 -08:00
|
|
|
# define CONFIG_OMIT_FP 0 // enable use of ia32's fast stack walk
|
2005-10-28 19:32:36 -07:00
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-01-19 03:33:11 -08: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 08:45:22 -08:00
|
|
|
#endif
|
|
|
|
|
|
2005-08-09 09:23:19 -07:00
|
|
|
// enable additional debug checks (very slow).
|
|
|
|
|
#ifndef CONFIG_PARANOIA
|
|
|
|
|
# define CONFIG_PARANOIA 0
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-12-20 12:09:19 -08:00
|
|
|
// final release; disables some safety checks.
|
2006-04-09 23:44:54 -07:00
|
|
|
#ifndef CONFIG_FINAL
|
|
|
|
|
# define CONFIG_FINAL 0
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-05-07 09:33:24 -07:00
|
|
|
#endif // #ifndef INCLUDED_CONFIG
|