Commit bc7dd87d authored by Heng Liu's avatar Heng Liu

Merge remote-tracking branch 'origin/master' into MorePropertySupport

parents 246930d8 f62a5768
......@@ -21,6 +21,22 @@ cppcheck:
paths:
- cppcheck.log
VS2017-64-bit:
variables:
BUILD_PLATFORM: "VS2017"
ARCHITECTURE: "x64"
script: "CI\\Windows.bat"
tags:
- VS2015
VS2017-32-bit:
variables:
BUILD_PLATFORM: "VS2017"
ARCHITECTURE: "x32"
script: "CI\\Windows.bat"
tags:
- VS2017
VS2015-64-bit:
variables:
BUILD_PLATFORM: "VS2015"
......
......@@ -46,8 +46,40 @@ IF "%BUILD_PLATFORM%" == "VS2015" (
)
IF "%BUILD_PLATFORM%" == "VS2017" (
set LIBPATH=E:\libs\VS2017
set GTESTVERSION=gtest-1.7.0
set GENERATOR=Visual Studio 15%ARCH_VS%
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com"
set QT_VERSION=
IF "%ARCHITECTURE%" == "x64" (
set QT_INSTALL_PATH=E:\Qt\Qt5.10.1\5.10.1\msvc2017_64
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.10.1\5.10.1\msvc2017_64
)
IF "%ARCHITECTURE%" == "x32" (
echo "No Qt Binaries for VS2017 i386 available! i can not set any Qt Install Path"
)
)
ECHO "==============================================================="
ECHO "==============================================================="
ECHO "Building with :"
ECHO "ARCHITECTURE : %ARCHITECTURE%"
ECHO "BUILD_PLATFORM : %BUILD_PLATFORM%"
ECHO "GTESTVERSION : %GTESTVERSION%"
ECHO "GENERATOR : %GENERATOR%"
ECHO "CMAKE_CONFIGURATION : %CMAKE_CONFIGURATION%"
ECHO "VS_PATH : %VS_PATH%"
ECHO "LIBPATH : %LIBPATH%"
ECHO "==============================================================="
ECHO "==============================================================="
"cmake" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release %CMAKE_CONFIGURATION% ..
"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release %CMAKE_CONFIGURATION% ..
%VS_PATH% /Build "Release" OpenVolumeMesh.sln /Project "ALL_BUILD"
......@@ -68,7 +100,7 @@ mkdir build-debug
cd build-debug
"cmake" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Debug %CMAKE_CONFIGURATION% ..
"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Debug %CMAKE_CONFIGURATION% ..
%VS_PATH% /Build "Debug" OpenVolumeMesh.sln /Project "ALL_BUILD"
......
......@@ -45,7 +45,7 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
~/sw/gtest-1.8.0/include
~/sw/gtest-1.7.0/include
~/sw/gtest/include
/ACG/acgdev/gcc-4.7-x86_64/gtest/include
/ACG/acgdev/gcc-x86_64/gtest/include
/opt/local/include
/usr/local/include
/usr/include
......@@ -56,10 +56,10 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
~/sw/gtest-1.8.0/lib
~/sw/gtest-1.7.0/lib
~/sw/gtest/lib
/ACG/acgdev/gcc-4.7-x86_64/gtest/lib
/ACG/acgdev/gcc-x86_64/gtest/lib
/opt/local/lib
/usr/local/lib
/usr/lib
/usr/include
"C:/libs/win32/gtest/lib"
NO_DEFAULT_PATH )
find_library(_GTEST_MAIN_LIBRARY gtest_main
......@@ -67,10 +67,10 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
~/sw/gtest-1.8.0/lib
~/sw/gtest-1.7.0/lib
~/sw/gtest/lib
/ACG/acgdev/gcc-4.7-x86_64/gtest/lib
/ACG/acgdev/gcc-x86_64/gtest/lib
/opt/local/lib
/usr/local/lib
/usr/lib
/usr/include
"C:/libs/win32/gtest/lib"
NO_DEFAULT_PATH )
......@@ -84,24 +84,29 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
set(GTEST_INCLUDE_DIRS ${_GTEST_INCLUDE_DIR} CACHE PATH
"Include directories for Google Test framework")
if ( NOT WIN32 )
if ( NOT WIN32 )
set(GTEST_LIBRARIES ${_GTEST_LIBRARY} CACHE FILEPATH
"Libraries to link for Google Test framework")
set(GTEST_MAIN_LIBRARIES ${_GTEST_MAIN_LIBRARY} CACHE FILEPATH
"Libraries to link for Google Test automatic main() definition")
else()
set(GTEST_LIBRARIES "optimized;gtest;debug;gtestd" CACHE FILEPATH
set(GTEST_MAIN_LIBRARY ${_GTEST_MAIN_LIBRARY} CACHE FILEPATH
"Libraries to link for Google Test automatic main() definition")
else()
set(GTEST_LIBRARIES "optimized;gtest;debug;gtestd" CACHE FILEPATH
"Libraries to link for Google Test framework")
set(GTEST_MAIN_LIBRARIES "optimized;gtest_main;debug;gtest_maind" CACHE FILEPATH
"Libraries to link for Google Test automatic main() definition")
endif()
set(GTEST_MAIN_LIBRARY "optimized;gtest_main;debug;gtest_maind" CACHE FILEPATH
"Libraries to link for Google Test automatic main() definition")
endif()
# Macro required to use google test with vs2012
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
add_definitions(-D_VARIADIC_MAX=10)
endif()
# Macro required to use google test with vs2012
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
add_definitions(-D_VARIADIC_MAX=10)
endif()
set(GTEST_LIBRARY ${_GTEST_LIBRARY} CACHE FILEPATH
"GTest Libraries")
set(GTEST_LIBRARY_DIR ${_GTEST_LIBRARY_DIR} CACHE FILEPATH
"Library dir containing Google Test libraries")
mark_as_advanced(GTEST_INCLUDE_DIRS GTEST_LIBRARIES GTEST_MAIN_LIBRARIES GTEST_LIBRARY_DIR )
......
......@@ -83,85 +83,92 @@ template<class T>
class VertexPropertyT : public PropertyPtr<OpenVolumeMeshPropertyT<T>, VertexPropHandle> {
public:
VertexPropertyT(const std::string& _name, ResourceManager& _resMan, VertexPropHandle _handle, const T _def = T());
VertexPropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, VertexPropHandle _handle);
virtual ~VertexPropertyT() {}
virtual BaseProperty* clone(ResourceManager &_resMan, OpenVolumeMeshHandle _handle) const;
virtual void serialize(std::ostream& _ostr) const;
virtual void deserialize(std::istream& _istr);
virtual const std::string entityType() const { return "VProp"; }
virtual const std::string typeNameWrapper() const { return typeName<T>(); }
private:
VertexPropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, VertexPropHandle _handle);
};
template<class T>
class EdgePropertyT : public PropertyPtr<OpenVolumeMeshPropertyT<T>, EdgePropHandle> {
public:
EdgePropertyT(const std::string& _name, ResourceManager& _resMan, EdgePropHandle _handle, const T _def = T());
EdgePropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, EdgePropHandle _handle);
virtual ~EdgePropertyT() {}
virtual BaseProperty* clone(ResourceManager &_resMan, const OpenVolumeMeshHandle _handle) const;
virtual void serialize(std::ostream& _ostr) const;
virtual void deserialize(std::istream& _istr);
virtual const std::string entityType() const { return "EProp"; }
virtual const std::string typeNameWrapper() const { return typeName<T>(); }
private:
EdgePropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, EdgePropHandle _handle);
};
template<class T>
class HalfEdgePropertyT : public PropertyPtr<OpenVolumeMeshPropertyT<T>, HalfEdgePropHandle> {
public:
HalfEdgePropertyT(const std::string& _name, ResourceManager& _resMan, HalfEdgePropHandle _handle, const T _def = T());
HalfEdgePropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, HalfEdgePropHandle _handle);
virtual ~HalfEdgePropertyT() {}
virtual BaseProperty* clone(ResourceManager &_resMan, const OpenVolumeMeshHandle _handle) const;
virtual void serialize(std::ostream& _ostr) const;
virtual void deserialize(std::istream& _istr);
virtual const std::string entityType() const { return "HEProp"; }
virtual const std::string typeNameWrapper() const { return typeName<T>(); }
private:
HalfEdgePropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, HalfEdgePropHandle _handle);
};
template<class T>
class FacePropertyT : public PropertyPtr<OpenVolumeMeshPropertyT<T>, FacePropHandle> {
public:
FacePropertyT(const std::string& _name, ResourceManager& _resMan, FacePropHandle _handle, const T _def = T());
FacePropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, FacePropHandle _handle);
virtual ~FacePropertyT() {}
virtual BaseProperty* clone(ResourceManager &_resMan, const OpenVolumeMeshHandle _handle) const;
virtual void serialize(std::ostream& _ostr) const;
virtual void deserialize(std::istream& _istr);
virtual const std::string entityType() const { return "FProp"; }
virtual const std::string typeNameWrapper() const { return typeName<T>(); }
private:
FacePropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, FacePropHandle _handle);
};
template<class T>
class HalfFacePropertyT : public PropertyPtr<OpenVolumeMeshPropertyT<T>, HalfFacePropHandle> {
public:
HalfFacePropertyT(const std::string& _name, ResourceManager& _resMan, HalfFacePropHandle _handle, const T _def = T());
HalfFacePropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, HalfFacePropHandle _handle);
virtual ~HalfFacePropertyT() {}
virtual BaseProperty* clone(ResourceManager &_resMan, const OpenVolumeMeshHandle _handle) const;
virtual void serialize(std::ostream& _ostr) const;
virtual void deserialize(std::istream& _istr);
virtual const std::string entityType() const { return "HFProp"; }
virtual const std::string typeNameWrapper() const { return typeName<T>(); }
private:
HalfFacePropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, HalfFacePropHandle _handle);
};
template<class T>
class CellPropertyT : public PropertyPtr<OpenVolumeMeshPropertyT<T>, CellPropHandle> {
public:
CellPropertyT(const std::string& _name, ResourceManager& _resMan, CellPropHandle _handle, const T _def = T());
CellPropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, CellPropHandle _handle);
virtual ~CellPropertyT() {}
virtual BaseProperty* clone(ResourceManager &_resMan, const OpenVolumeMeshHandle _handle) const;
virtual void serialize(std::ostream& _ostr) const;
virtual void deserialize(std::istream& _istr);
virtual const std::string entityType() const { return "CProp"; }
virtual const std::string typeNameWrapper() const { return typeName<T>(); }
private:
CellPropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, CellPropHandle _handle);
};
template<class T>
class MeshPropertyT : public PropertyPtr<OpenVolumeMeshPropertyT<T>, MeshPropHandle> {
public:
MeshPropertyT(const std::string& _name, ResourceManager& _resMan, MeshPropHandle _handle, const T _def = T());
MeshPropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, MeshPropHandle _handle);
virtual ~MeshPropertyT() {}
virtual BaseProperty* clone(ResourceManager &_resMan, const OpenVolumeMeshHandle _handle) const;
virtual void serialize(std::ostream& _ostr) const;
virtual void deserialize(std::istream& _istr);
virtual const std::string entityType() const { return "MProp"; }
virtual const std::string typeNameWrapper() const { return typeName<T>(); }
private:
MeshPropertyT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager& _resMan, MeshPropHandle _handle);
};
} // Namespace OpenVolumeMesh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment