mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Fix C++17 builds: (#2192)
- Fix C++17 Visual Studio builds. - Use C++17 for `windows-2019` builds. - Removed options for unsupported compiler (MSVC11). - Removed options, not needed after enabling C++11+ features in gmock/gtest.
This commit is contained in:
committed by
GitHub
parent
9cb347b4b2
commit
4dc7170d21
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
- os: windows-2016
|
- os: windows-2016
|
||||||
standard: 11
|
standard: 11
|
||||||
- os: windows-2019
|
- os: windows-2019
|
||||||
standard: 14
|
standard: 17
|
||||||
- os: windows-2016
|
- os: windows-2016
|
||||||
platform: Win32
|
platform: Win32
|
||||||
build_type: Debug
|
build_type: Debug
|
||||||
|
@ -17,12 +17,9 @@ else ()
|
|||||||
target_compile_definitions(gmock PUBLIC GTEST_HAS_PTHREAD=0)
|
target_compile_definitions(gmock PUBLIC GTEST_HAS_PTHREAD=0)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_compile_definitions(gmock PUBLIC GTEST_LANG_CXX11=0)
|
target_compile_definitions(gmock PUBLIC GTEST_LANG_CXX11=1)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# Workaround a bug in implementation of variadic templates in MSVC11.
|
|
||||||
target_compile_definitions(gmock PUBLIC _VARIADIC_MAX=10)
|
|
||||||
|
|
||||||
# Disable MSVC warnings of _CRT_INSECURE_DEPRECATE functions.
|
# Disable MSVC warnings of _CRT_INSECURE_DEPRECATE functions.
|
||||||
target_compile_definitions(gmock PRIVATE _CRT_SECURE_NO_WARNINGS)
|
target_compile_definitions(gmock PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
@ -31,11 +28,6 @@ if (MSVC)
|
|||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# GTest doesn't detect <tuple> with clang.
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
||||||
target_compile_definitions(gmock PUBLIC GTEST_USE_OWN_TR1_TUPLE=1)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# Silence MSVC tr1 deprecation warning in gmock.
|
# Silence MSVC tr1 deprecation warning in gmock.
|
||||||
target_compile_definitions(gmock
|
target_compile_definitions(gmock
|
||||||
PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1)
|
PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1)
|
||||||
|
Reference in New Issue
Block a user