diff --git a/Doc/changelog.docu b/Doc/changelog.docu
index cf4bb4e4..8c73baff 100644
--- a/Doc/changelog.docu
+++ b/Doc/changelog.docu
@@ -9,6 +9,16 @@
| 6.2 (2016/07/11) |
diff --git a/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.hh b/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.hh
index dd54f59d..9b8fa4d9 100644
--- a/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.hh
+++ b/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.hh
@@ -114,7 +114,7 @@ public:
typedef Decimater::ModNormalFlippingT< mesh_t >::Handle mod_nf_t;
// object types
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
typedef std::unique_ptr< decimater_t > decimater_o;
#else
typedef std::auto_ptr< decimater_t > decimater_o;
diff --git a/src/OpenMesh/Apps/Unsupported/OsgViewer/osgviewer.cc b/src/OpenMesh/Apps/Unsupported/OsgViewer/osgviewer.cc
index c5f8a9d0..e5d4a87f 100644
--- a/src/OpenMesh/Apps/Unsupported/OsgViewer/osgviewer.cc
+++ b/src/OpenMesh/Apps/Unsupported/OsgViewer/osgviewer.cc
@@ -131,7 +131,7 @@ public:
bool bind( osg::GeometryPtr geo )
{
- #if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+ #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
std::unique_ptr obj(new mesh_t);
#else
std::auto_ptr obj(new mesh_t);
diff --git a/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc b/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc
index b261c6b6..c939fb39 100644
--- a/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc
+++ b/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc
@@ -851,7 +851,7 @@ compute_screen_space_error(VHierarchyNodeHandle node_handle, VHierarchyNodeHandl
Vec3f residual;
Vec3f res;
Vec3f lp;
-#if (_MSC_VER >= 1900 )
+#if ((defined(_MSC_VER) && (_MSC_VER >= 1900)) )
// Workaround for internal compiler error
Vec3f tri[3]{ {},{},{} };
#else
diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt
index 67c37ea1..83b11eb2 100644
--- a/src/OpenMesh/Core/CMakeLists.txt
+++ b/src/OpenMesh/Core/CMakeLists.txt
@@ -3,7 +3,6 @@ include (ACGCommon)
include_directories (
../..
${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/src
)
# source code directories
diff --git a/src/OpenMesh/Core/Geometry/VectorT.hh b/src/OpenMesh/Core/Geometry/VectorT.hh
index b79882b4..d8c8f2b1 100644
--- a/src/OpenMesh/Core/Geometry/VectorT.hh
+++ b/src/OpenMesh/Core/Geometry/VectorT.hh
@@ -60,7 +60,7 @@
// macro expansion and preprocessor defines
// don't work properly.
-#if (_MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
+#if ((defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
#include "Vector11T.hh"
#else
#ifndef DOXYGEN
diff --git a/src/OpenMesh/Core/Mesh/IteratorsT.hh b/src/OpenMesh/Core/Mesh/IteratorsT.hh
index d12e5eb0..ca0d31e9 100644
--- a/src/OpenMesh/Core/Mesh/IteratorsT.hh
+++ b/src/OpenMesh/Core/Mesh/IteratorsT.hh
@@ -170,7 +170,7 @@ class GenericIteratorT {
return cpy;
}
-#if (_MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
+#if ((defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
template
auto operator+=(int amount) ->
typename std::enable_if<
diff --git a/src/OpenMesh/Core/System/config.h b/src/OpenMesh/Core/System/config.h
index b247f812..8662bde1 100644
--- a/src/OpenMesh/Core/System/config.h
+++ b/src/OpenMesh/Core/System/config.h
@@ -102,7 +102,7 @@
typedef unsigned int uint;
-#if (_MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__))
+#if ((defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__))
#define OM_HAS_HASH
#endif
diff --git a/src/OpenMesh/Core/System/mostream.hh b/src/OpenMesh/Core/System/mostream.hh
index f079b454..c197a49b 100644
--- a/src/OpenMesh/Core/System/mostream.hh
+++ b/src/OpenMesh/Core/System/mostream.hh
@@ -70,7 +70,7 @@
#include
#include
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#include
#endif
@@ -189,7 +189,7 @@ protected:
virtual int sync()
{
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
- #if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
+ #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
std::lock_guard lck (serializer_);
#endif
@@ -214,7 +214,7 @@ protected:
char c = traits_type::to_char_type(_c);
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
- #if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
+ #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
{
std::lock_guard lck (serializer_);
buffer_.push_back(c);
@@ -264,7 +264,7 @@ private:
bool enabled_;
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
- #if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
+ #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
std::mutex serializer_;
#endif
diff --git a/src/OpenMesh/Core/Utils/PropertyContainer.hh b/src/OpenMesh/Core/Utils/PropertyContainer.hh
index 53584bb2..ae8d9dfc 100644
--- a/src/OpenMesh/Core/Utils/PropertyContainer.hh
+++ b/src/OpenMesh/Core/Utils/PropertyContainer.hh
@@ -204,7 +204,7 @@ public:
* In C++11 an beyond we can introduce more efficient and more legible
* implementations of the following methods.
*/
-#if (_MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
+#if ((defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
/**
* Reserves space for \p _n elements in all property vectors.
*/
diff --git a/src/OpenMesh/Core/Utils/PropertyManager.hh b/src/OpenMesh/Core/Utils/PropertyManager.hh
index f05903a9..51fc269e 100644
--- a/src/OpenMesh/Core/Utils/PropertyManager.hh
+++ b/src/OpenMesh/Core/Utils/PropertyManager.hh
@@ -92,7 +92,7 @@ namespace OpenMesh {
*/
template
class PropertyManager {
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
public:
PropertyManager(const PropertyManager&) = delete;
PropertyManager& operator=(const PropertyManager&) = delete;
@@ -167,7 +167,7 @@ class PropertyManager {
MeshT &getMesh() const { return *mesh_; }
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
/// Only for pre C++11 compatibility.
typedef PropertyManager Proxy;
diff --git a/src/OpenMesh/Tools/Decimater/DecimaterT.cc b/src/OpenMesh/Tools/Decimater/DecimaterT.cc
index 31c47103..a7e18dce 100644
--- a/src/OpenMesh/Tools/Decimater/DecimaterT.cc
+++ b/src/OpenMesh/Tools/Decimater/DecimaterT.cc
@@ -78,7 +78,7 @@ template
DecimaterT::DecimaterT(Mesh& _mesh) :
BaseDecimaterT(_mesh),
mesh_(_mesh),
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
heap_(nullptr)
#else
heap_(NULL)
@@ -178,7 +178,7 @@ size_t DecimaterT::decimate(size_t _n_collapses) {
// initialize heap
HeapInterface HI(mesh_, priority_, heap_position_);
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
heap_ = std::unique_ptr(new DeciHeap(HI));
#else
heap_ = std::auto_ptr(new DeciHeap(HI));
@@ -282,7 +282,7 @@ size_t DecimaterT::decimate_to_faces(size_t _nv, size_t _nf) {
// initialize heap
HeapInterface HI(mesh_, priority_, heap_position_);
- #if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
+ #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
heap_ = std::unique_ptr(new DeciHeap(HI));
#else
heap_ = std::auto_ptr(new DeciHeap(HI));
diff --git a/src/OpenMesh/Tools/Decimater/DecimaterT.hh b/src/OpenMesh/Tools/Decimater/DecimaterT.hh
index c31b2be6..2c71a093 100644
--- a/src/OpenMesh/Tools/Decimater/DecimaterT.hh
+++ b/src/OpenMesh/Tools/Decimater/DecimaterT.hh
@@ -195,7 +195,7 @@ private: //------------------------------------------------------- private data
Mesh& mesh_;
// heap
- #if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
+ #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
std::unique_ptr heap_;
#else
std::auto_ptr heap_;
diff --git a/src/OpenMesh/Tools/Utils/HeapT.hh b/src/OpenMesh/Tools/Utils/HeapT.hh
index 47e0b184..5a28ff7f 100644
--- a/src/OpenMesh/Tools/Utils/HeapT.hh
+++ b/src/OpenMesh/Tools/Utils/HeapT.hh
@@ -79,7 +79,7 @@
#include "Config.hh"
#include
#include
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#include
#endif
@@ -150,7 +150,7 @@ public:
/// Constructor
HeapT() : HeapVector() {}
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
/// Construct with a given \c HeapIterface.
HeapT(HeapInterface _interface)
: HeapVector(), interface_(std::move(_interface))
diff --git a/src/OpenMesh/Tools/VDPM/ViewingParameters.cc b/src/OpenMesh/Tools/VDPM/ViewingParameters.cc
index 2036e2fb..065c9319 100644
--- a/src/OpenMesh/Tools/VDPM/ViewingParameters.cc
+++ b/src/OpenMesh/Tools/VDPM/ViewingParameters.cc
@@ -92,7 +92,7 @@ update_viewing_configurations()
Vec3f trans;
// Workaround for internal compiler error on Visual Studio 2015 Update 1
-#if (_MSC_VER >= 1900 )
+#if ((defined(_MSC_VER) && (_MSC_VER >= 1900)) )
Vec3f inv_rot[3]{ {},{},{} };
Vec3f normal[4]{ {},{},{},{} };
#else
diff --git a/src/Python/Vector.hh b/src/Python/Vector.hh
index fc453816..cfb03cad 100644
--- a/src/Python/Vector.hh
+++ b/src/Python/Vector.hh
@@ -78,7 +78,7 @@ void defInitMod(class_< OpenMesh::VectorT > &classVector) {
classVector
.def("__init__", make_constructor(&Factory::vec3_default))
.def("__init__", make_constructor(&Factory::vec3_user_defined))
-#if (_MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
+#if ((defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
.def("__mod__", &Factory::Vector3::template operator%)
;
def("cross", &Factory::Vector3::template operator%);
@@ -144,7 +144,7 @@ void expose_vec(const char *_name) {
.def("vectorize", &Vector::vectorize, return_internal_reference<>())
.def(self < self)
-#if (_MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
+#if ((defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
.def("dot", &Vector::template operator|)
.def("norm", &Vector::template norm)
.def("length", &Vector::template length)
diff --git a/src/Unittests/unittests_cpp_11_features.cc b/src/Unittests/unittests_cpp_11_features.cc
index f50e0a9c..a001cf9c 100644
--- a/src/Unittests/unittests_cpp_11_features.cc
+++ b/src/Unittests/unittests_cpp_11_features.cc
@@ -53,7 +53,7 @@ class OpenMesh_Triangle : public OpenMeshBase {
* ====================================================================
*/
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
/*
*/
diff --git a/src/Unittests/unittests_propertymanager.cc b/src/Unittests/unittests_propertymanager.cc
index 5ee75c62..acf404f3 100644
--- a/src/Unittests/unittests_propertymanager.cc
+++ b/src/Unittests/unittests_propertymanager.cc
@@ -97,7 +97,7 @@ TEST_F(OpenMeshPropertyManager, set_range_bool) {
* C++11 Specific Tests
* ====================================================================
*/
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
template
bool has_property(const Mesh& _mesh, const std::string& _name) {
diff --git a/src/Unittests/unittests_vector_type.cc b/src/Unittests/unittests_vector_type.cc
index 7c1dd5a1..a2652d47 100644
--- a/src/Unittests/unittests_vector_type.cc
+++ b/src/Unittests/unittests_vector_type.cc
@@ -84,7 +84,7 @@ TEST_F(OpenMeshVectorTest, VectorCasting) {
}
-#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
TEST_F(OpenMeshVectorTest, cpp11_constructors) {
OpenMesh::Vec3d vec1 { 1.2, 2.0, 3.0 };
|