From 2aeab4f973144fe859d5751e969512a92ae08d96 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 13 Aug 2011 23:30:35 +0200 Subject: Borland can't do deprecated. --- Modules/GenerateExportHeader.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 044e2b4..5b42b77 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -158,11 +158,15 @@ macro(_test_compiler_hidden_visibility) endmacro() macro(_test_compiler_has_deprecated) - _check_cxx_compiler_attribute("__attribute__((__deprecated__))" COMPILER_HAS_DEPRECATED_ATTR) - if(COMPILER_HAS_DEPRECATED_ATTR) - set(COMPILER_HAS_DEPRECATED "${COMPILER_HAS_DEPRECATED_ATTR}" CACHE INTERNAL "Compiler support for a deprecated attribute") + if("${CMAKE_CXX_COMPILER_ID}" MATCHES Borland) + set(COMPILER_HAS_DEPRECATED "" CACHE INTERNAL "Compiler support for a deprecated attribute") else() - _check_cxx_compiler_attribute("__declspec(deprecated)" COMPILER_HAS_DEPRECATED) + _check_cxx_compiler_attribute("__attribute__((__deprecated__))" COMPILER_HAS_DEPRECATED_ATTR) + if(COMPILER_HAS_DEPRECATED_ATTR) + set(COMPILER_HAS_DEPRECATED "${COMPILER_HAS_DEPRECATED_ATTR}" CACHE INTERNAL "Compiler support for a deprecated attribute") + else() + _check_cxx_compiler_attribute("__declspec(deprecated)" COMPILER_HAS_DEPRECATED) + endif() endif() endmacro() -- cgit v0.12