Developer Documentation
Loading...
Searching...
No Matches
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
47//=============================================================================
48
49#ifndef OPENMESH_CONFIG_H
50#define OPENMESH_CONFIG_H
51
52//=============================================================================
53
54#include <assert.h>
55#include <OpenMesh/Core/System/compiler.hh>
56#include <OpenMesh/Core/System/OpenMeshDLLMacros.hh>
57
58// ----------------------------------------------------------------------------
59
60
61#define OM_VERSION 0x0B0000
62//#define OM_VERSION 0x70200
63
64#define OM_GET_VER ((OM_VERSION & 0xf0000) >> 16)
65#define OM_GET_MAJ ((OM_VERSION & 0x0ff00) >> 8)
66#define OM_GET_MIN (OM_VERSION & 0x000ff)
67
68#ifdef WIN32
69# ifdef min
70# 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 !")
71# error min macro active
72# endif
73# ifdef max
74# 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 !")
75# error max macro active
76# endif
77#endif
78
80#if defined(OM_SUPPRESS_DEPRECATED)
81#pragma message( \
82 "OpenMesh deprecated code warnings suppressed, please fix your code soon")
83# define OM_DEPRECATED(msg)
84#elif defined(_MSC_VER)
85# define OM_DEPRECATED(msg) __declspec(deprecated(msg))
86#elif defined(__GNUC__)
87# if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 /* Test for GCC >= 4.5.0 */
88# define OM_DEPRECATED(msg) __attribute__ ((deprecated(msg)))
89# else
90# define OM_DEPRECATED(msg) __attribute__ ((deprecated))
91# endif
92#elif defined(__clang__)
93# define OM_DEPRECATED(msg) __attribute__ ((deprecated(msg)))
94#else
95# define OM_DEPRECATED(msg)
96#endif
97
98typedef unsigned int uint;
99
100#if ((defined(_MSC_VER) && (_MSC_VER >= 1800)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__))
101#define OM_HAS_HASH
102#endif
103
104//=============================================================================
105#endif // OPENMESH_CONFIG_H defined
106//=============================================================================