diff --git a/unitTests/CMakeLists.txt b/unitTests/CMakeLists.txt index 2fe73e82..2f141d2e 100644 --- a/unitTests/CMakeLists.txt +++ b/unitTests/CMakeLists.txt @@ -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 diff --git a/unitTests/gtestwrapper.h b/unitTests/gtestwrapper.h new file mode 100644 index 00000000..100f0ae8 --- /dev/null +++ b/unitTests/gtestwrapper.h @@ -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 +#ifdef _MSC_VER + #pragma warning(pop) +#endif + +#endif // #ifndef GTESTWRAPPER_H_ diff --git a/unitTests/mainTestRunner.cpp b/unitTests/mainTestRunner.cpp index f8ffaa44..519e054a 100644 --- a/unitTests/mainTestRunner.cpp +++ b/unitTests/mainTestRunner.cpp @@ -1,4 +1,4 @@ -#include +#include "gtestwrapper.h" #include diff --git a/unitTests/test_types.cpp b/unitTests/test_types.cpp index 59e2d116..489b4fcb 100644 --- a/unitTests/test_types.cpp +++ b/unitTests/test_types.cpp @@ -1,6 +1,7 @@ -#include #include +#include "gtestwrapper.h" + using namespace Exiv2; // More info about tm : http://www.cplusplus.com/reference/ctime/tm/