Merge pull request #173 from piponazo/fixGtestWarningsOnWindows
Provide a gtestWrapper header to skip useless warnings
This commit is contained in:
commit
f0ee2b638c
@ -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
unitTests/gtestwrapper.h
Normal file
14
unitTests/gtestwrapper.h
Normal 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,4 +1,4 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "gtestwrapper.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@ -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/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user