Provide a gtestWrapper header to skip useless warnings

This commit is contained in:
Luis Díaz Más
2017-11-23 19:31:20 +01:00
parent 4c4f91e407
commit cfe614d8c3
4 changed files with 18 additions and 2 deletions
+1
View File
@@ -1,5 +1,6 @@
add_executable(unit_tests mainTestRunner.cpp
test_types.cpp
gtestwrapper.h
)
#TODO Use GTest::GTest once we upgrade the minimum CMake version required
+14
View File
@@ -0,0 +1,14 @@
#ifndef GTESTWRAPPER_H_
#define GTESTWRAPPER_H_
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4251)
#pragma warning(disable : 4275)
#endif
#include <gtest/gtest.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // #ifndef GTESTWRAPPER_H_
+1 -1
View File
@@ -1,4 +1,4 @@
#include <gtest/gtest.h>
#include "gtestwrapper.h"
#include <iostream>
+2 -1
View File
@@ -1,6 +1,7 @@
#include <gtest/gtest.h>
#include <exiv2/types.hpp>
#include "gtestwrapper.h"
using namespace Exiv2;
// More info about tm : http://www.cplusplus.com/reference/ctime/tm/