Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
config.h
Go to the documentation of this file.
1/* Copyright (C) 2021 Wildfire Games.
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining
4 * a copy of this software and associated documentation files (the
5 * "Software"), to deal in the Software without restriction, including
6 * without limitation the rights to use, copy, modify, merge, publish,
7 * distribute, sublicense, and/or sell copies of the Software, and to
8 * permit persons to whom the Software is furnished to do so, subject to
9 * the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 */
22
23/*
24 * compile-time configuration for the entire project
25 */
26
27#ifndef INCLUDED_CONFIG
28#define INCLUDED_CONFIG
29
30// notes:
31// - this file is included in the PCH and thus affects the entire project.
32// to avoid unnecessary full rebuilds, place settings of more limited
33// applicability in config2.h and explicitly include that header.
34// - config macros are always defined; their values (1 or 0) are tested
35// with #if instead of #ifdef. this protects against typos by at least
36// causing a warning if the tested macro is undefined.
37// - allow override via compiler settings by checking #ifndef.
38
39// precompiled headers
40#ifndef CONFIG_ENABLE_PCH
41# define CONFIG_ENABLE_PCH 1 // improve build performance
42#endif
43
44// try to prevent any exceptions from being thrown - even by the C++
45// standard library. useful only for performance tests.
46#ifndef CONFIG_DISABLE_EXCEPTIONS
47# define CONFIG_DISABLE_EXCEPTIONS 0
48#endif
49
50// enable additional debug checks (potentially rather slow).
51#ifndef CONFIG_ENABLE_CHECKS
52# define CONFIG_ENABLE_CHECKS 0
53#endif
54
55// allow the use of Boost? (affects PCH and several individual modules)
56#ifndef CONFIG_ENABLE_BOOST
57# define CONFIG_ENABLE_BOOST 1
58#endif
59
60#endif // #ifndef INCLUDED_CONFIG