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:
parent
78a6e1c122
commit
df4615e338
|
@ -160,11 +160,10 @@ endmacro()
|
||||||
macro(_test_compiler_has_deprecated)
|
macro(_test_compiler_has_deprecated)
|
||||||
_check_cxx_compiler_attribute("__declspec(deprecated)" COMPILER_HAS_DEPRECATED_DECLSPEC)
|
_check_cxx_compiler_attribute("__declspec(deprecated)" COMPILER_HAS_DEPRECATED_DECLSPEC)
|
||||||
if(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()
|
else()
|
||||||
_check_cxx_compiler_attribute("__attribute__((__deprecated__))" COMPILER_HAS_DEPRECATED)
|
_check_cxx_compiler_attribute("__attribute__((__deprecated__))" COMPILER_HAS_DEPRECATED)
|
||||||
endif()
|
endif()
|
||||||
set(COMPILER_HAS_DEPRECATED "${COMPILER_HAS_DEPRECATED}" CACHE INTERNAL "Compiler support for a deprecated attribute")
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
set(myDir ${CMAKE_CURRENT_LIST_DIR})
|
set(myDir ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
|
Loading…
Reference in New Issue