mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-16 12:11:04 -06:00
Add the COMPILER_HAS_DEPRECATED only if it has a declspec variant
_check_cxx_compiler_attribute does it in the alternative.
This commit is contained in:
@@ -160,11 +160,10 @@ endmacro()
|
||||
macro(_test_compiler_has_deprecated)
|
||||
_check_cxx_compiler_attribute("__declspec(deprecated)" COMPILER_HAS_DEPRECATED_DECLSPEC)
|
||||
if(COMPILER_HAS_DEPRECATED_DECLSPEC)
|
||||
set(COMPILER_HAS_DEPRECATED ${COMPILER_HAS_DEPRECATED_DECLSPEC})
|
||||
set(COMPILER_HAS_DEPRECATED "${COMPILER_HAS_DEPRECATED_DECLSPEC}" CACHE INTERNAL "Compiler support for a deprecated attribute")
|
||||
else()
|
||||
_check_cxx_compiler_attribute("__attribute__((__deprecated__))" COMPILER_HAS_DEPRECATED)
|
||||
endif()
|
||||
set(COMPILER_HAS_DEPRECATED "${COMPILER_HAS_DEPRECATED}" CACHE INTERNAL "Compiler support for a deprecated attribute")
|
||||
endmacro()
|
||||
|
||||
set(myDir ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
Reference in New Issue
Block a user