From ecdc4b10ba92b51ef21fe5463e9e305d301f6d57 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 18 Dec 2017 08:20:14 +0100 Subject: [PATCH] System : VS2017 add definition _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING https://github.com/google/googletest/issues/1036 --- ApplicationCode/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index 81be8be0eb..210a2fe9c5 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -8,6 +8,11 @@ CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/ApplicationCode/Adm/RiaVersionInfo.h.cmake ${CMAKE_BINARY_DIR}/Generated/RiaVersionInfo.h ) +if (MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11)) + # VS 2017 : Disable warnings from from gtest code, using deprecated code related to TR1 + add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING) + message("Add flag to disable warings from gtest - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING") +endif() include_directories( ${cafPdmCore_SOURCE_DIR}