Developer Documentation
config.h
Go to the documentation of this file.
1 /* ========================================================================= *
2  * *
3  * OpenMesh *
4  * Copyright (c) 2001-2015, RWTH-Aachen University *
5  * Department of Computer Graphics and Multimedia *
6  * All rights reserved. *
7  * www.openmesh.org *
8  * *
9  *---------------------------------------------------------------------------*
10  * This file is part of OpenMesh. *
11  *---------------------------------------------------------------------------*
12  * *
13  * Redistribution and use in source and binary forms, with or without *
14  * modification, are permitted provided that the following conditions *
15  * are met: *
16  * *
17  * 1. Redistributions of source code must retain the above copyright notice, *
18  * this list of conditions and the following disclaimer. *
19  * *
20  * 2. Redistributions in binary form must reproduce the above copyright *
21  * notice, this list of conditions and the following disclaimer in the *
22  * documentation and/or other materials provided with the distribution. *
23  * *
24  * 3. Neither the name of the copyright holder nor the names of its *
25  * contributors may be used to endorse or promote products derived from *
26  * this software without specific prior written permission. *
27  * *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39  * *
40  * ========================================================================= */
41 
42 /*===========================================================================*\
43  * *
44  * $Revision$ *
45  * $Date$ *
46  * *
47 \*===========================================================================*/
48 
54 //=============================================================================
55 
56 #ifndef OPENMESH_CONFIG_H
57 #define OPENMESH_CONFIG_H
58 
59 //=============================================================================
60 
61 #include <assert.h>
62 #include <OpenMesh/Core/System/compiler.hh>
63 #include <OpenMesh/Core/System/OpenMeshDLLMacros.hh>
64 
65 // ----------------------------------------------------------------------------
66 
67 
68 #define OM_VERSION 0x90000
69 //#define OM_VERSION 0x70200
70 
71 #define OM_GET_VER ((OM_VERSION & 0xf0000) >> 16)
72 #define OM_GET_MAJ ((OM_VERSION & 0x0ff00) >> 8)
73 #define OM_GET_MIN (OM_VERSION & 0x000ff)
74 
75 #ifdef WIN32
76 # ifdef min
77 # pragma message("Detected min macro! OpenMesh does not compile with min/max macros active! Please add a define NOMINMAX to your compiler flags or add #undef min before including OpenMesh headers !")
78 # error min macro active
79 # endif
80 # ifdef max
81 # pragma message("Detected max macro! OpenMesh does not compile with min/max macros active! Please add a define NOMINMAX to your compiler flags or add #undef max before including OpenMesh headers !")
82 # error max macro active
83 # endif
84 #endif
85 
87 #if defined(OM_SUPPRESS_DEPRECATED)
88 #pragma message( \
89  "OpenMesh deprecated code warnings suppressed, please fix your code soon")
90 # define OM_DEPRECATED(msg)
91 #elif defined(_MSC_VER)
92 # define OM_DEPRECATED(msg) __declspec(deprecated(msg))
93 #elif defined(__GNUC__)
94 # if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 /* Test for GCC >= 4.5.0 */
95 # define OM_DEPRECATED(msg) __attribute__ ((deprecated(msg)))
96 # else
97 # define OM_DEPRECATED(msg) __attribute__ ((deprecated))
98 # endif
99 #elif defined(__clang__)
100 # define OM_DEPRECATED(msg) __attribute__ ((deprecated(msg)))
101 #else
102 # define OM_DEPRECATED(msg)
103 #endif
104 
105 typedef unsigned int uint;
106 
107 #if ((defined(_MSC_VER) && (_MSC_VER >= 1800)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__))
108 #define OM_HAS_HASH
109 #endif
110 
111 //=============================================================================
112 #endif // OPENMESH_CONFIG_H defined
113 //=============================================================================