1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Partially revert "[cmake] Make MSVC generate appropriate __cplusplus macro definition"

The /Zc:__cplusplus option fixes GTEST_LANG_CXX11 value but not GTEST_HAS_TR1_TUPLE,
so we still need to force the latter off.

Still pass the option since it is required by https://reviews.llvm.org/D78186 too.

Differential Revision: https://reviews.llvm.org/D84023
This commit is contained in:
Tatyana Krasnukha 2020-08-03 14:30:12 +03:00
parent f1245161ce
commit 9d9ac9bf36
2 changed files with 7 additions and 0 deletions

View File

@ -1405,6 +1405,10 @@ function(add_unittest test_suite test_name)
set(EXCLUDE_FROM_ALL ON)
endif()
# Our current version of gtest uses tr1/tuple which is deprecated on MSVC.
# Since LLVM itself requires C++14, we can safely force it off.
add_definitions(-DGTEST_HAS_TR1_TUPLE=0)
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
if (NOT LLVM_ENABLE_THREADS)

View File

@ -19,6 +19,9 @@ include_directories(
googlemock
)
# Gtest 1.8.0 uses tr1/tuple which is deprecated on MSVC, so we force it off.
add_definitions(-DGTEST_HAS_TR1_TUPLE=0)
if(WIN32)
add_definitions(-DGTEST_OS_WINDOWS=1)
endif()