Commit 901555c8 authored by Martin Heistermann's avatar Martin Heistermann
Browse files

Silence warnings caused by gtest.

parent 986d07fb
...@@ -46,9 +46,10 @@ if (UNIX) ...@@ -46,9 +46,10 @@ if (UNIX)
# Warnings # Warnings
################################################################################ ################################################################################
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang.*") if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
list(APPEND ADDITIONAL_CXX_FLAGS "-Weverything") list(APPEND ADDITIONAL_CXX_FLAGS "-Weverything")
list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-c++98-compat") list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-c++98-compat")
list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-c++98-compat-pedantic")
list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-padded") list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-padded")
list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-old-style-cast") list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-old-style-cast")
list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-documentation-unknown-command") list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-documentation-unknown-command")
......
#include <gtest/gtest.h> #include "unittests_common.hh"
#ifdef __clang__
# pragma GCC diagnostic ignored "-Weverything"
#endif
int main(int _argc, char** _argv) { int main(int _argc, char** _argv) {
......
#include <gtest/gtest.h> #include "unittests_common.hh"
#include <Unittests/unittests_common.hh>
#include <OpenVolumeMesh/Attribs/StatusAttrib.hh> #include <OpenVolumeMesh/Attribs/StatusAttrib.hh>
#include <OpenVolumeMesh/Attribs/NormalAttrib.hh> #include <OpenVolumeMesh/Attribs/NormalAttrib.hh>
......
#ifndef INCLUDE_UNITTESTS_COMMON_HH #ifndef INCLUDE_UNITTESTS_COMMON_HH
#define INCLUDE_UNITTESTS_COMMON_HH #define INCLUDE_UNITTESTS_COMMON_HH
#include <gtest/gtest.h>
#include <OpenVolumeMesh/Mesh/PolyhedralMesh.hh> #include <OpenVolumeMesh/Mesh/PolyhedralMesh.hh>
#include <OpenVolumeMesh/Mesh/HexahedralMesh.hh> #include <OpenVolumeMesh/Mesh/HexahedralMesh.hh>
...@@ -9,11 +8,15 @@ ...@@ -9,11 +8,15 @@
#include <OpenVolumeMesh/Geometry/VectorT.hh> #include <OpenVolumeMesh/Geometry/VectorT.hh>
#ifdef __clang__ #ifdef __clang__
# pragma GCC diagnostic ignored "-Weverything"
# pragma GCC diagnostic ignored "-Wundef"
# pragma GCC diagnostic ignored "-Wglobal-constructors" # pragma GCC diagnostic ignored "-Wglobal-constructors"
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
# pragma GCC diagnostic ignored "-Wundef" # pragma GCC diagnostic ignored "-Wmissing-noreturn"
#endif #endif
#include <gtest/gtest.h>
#define EXPECT_HANDLE_EQ(a, b) EXPECT_EQ((a).idx(), (b).idx()) #define EXPECT_HANDLE_EQ(a, b) EXPECT_EQ((a).idx(), (b).idx())
#define EXPECT_HANDLE_NE(a, b) EXPECT_NE((a).idx(), (b).idx()) #define EXPECT_HANDLE_NE(a, b) EXPECT_NE((a).idx(), (b).idx())
......
#include <gtest/gtest.h> #include "unittests_common.hh"
#include <Unittests/unittests_common.hh>
#include <OpenVolumeMesh/FileManager/FileManager.hh> #include <OpenVolumeMesh/FileManager/FileManager.hh>
......
#include <gtest/gtest.h> #include "unittests_common.hh"
#include <Unittests/unittests_common.hh>
using namespace OpenVolumeMesh; using namespace OpenVolumeMesh;
......
#include <iostream> #include <iostream>
#include <gtest/gtest.h>
#include "unittests_common.hh" #include "unittests_common.hh"
#include <OpenVolumeMesh/Attribs/StatusAttrib.hh> #include <OpenVolumeMesh/Attribs/StatusAttrib.hh>
......
#include <gtest/gtest.h> #include "unittests_common.hh"
#if __cplusplus >= 201103L || _MSC_VER >= 1800 #if __cplusplus >= 201103L || _MSC_VER >= 1800
......
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