Skip to content

Commit 7e7f6e0

Browse files
committed
minor: windows cmake uses different variables to configure deprecations
1 parent ad3a7f5 commit 7e7f6e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ endif()
4848
# that we end up not being able to turn deprecation warnings into
4949
# errors. Instead, since we know all our platforms offer the feature,
5050
# just hard enable it here.
51-
set (COMPILER_HAS_DEPRECATED_ATTR true)
51+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
52+
set(COMPILER_HAS_DEPRECATED true)
53+
else()
54+
set(COMPILER_HAS_DEPRECATED_ATTR true)
55+
endif()
5256

5357
set (CMAKE_SKIP_BUILD_RPATH false)
5458
set (CMAKE_BUILD_WITH_INSTALL_RPATH false)

0 commit comments

Comments
 (0)