System : Remove TR1 warnings from gtest

This commit is contained in:
Magne Sjaastad 2019-01-07 14:32:29 +01:00
parent ca267a7f44
commit 98da255772
3 changed files with 18 additions and 0 deletions

View File

@ -10,6 +10,12 @@ else()
include(${QT_USE_FILE})
endif(Qt5Core_FOUND)
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 (
${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
)

View File

@ -10,6 +10,12 @@ else()
include(${QT_USE_FILE})
endif(Qt5Core_FOUND)
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 (
${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
)

View File

@ -10,6 +10,12 @@ else()
include(${QT_USE_FILE})
endif(Qt5Core_FOUND)
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 (
${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
)