summaryrefslogtreecommitdiffstats
path: root/Modules/GenerateExportHeader.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2011-08-13 21:30:35 (GMT)
committerStephen Kelly <steveire@gmail.com>2011-08-13 21:49:17 (GMT)
commit2aeab4f973144fe859d5751e969512a92ae08d96 (patch)
tree01784d0f772d0e841bf284c343c6d01a484ef95e /Modules/GenerateExportHeader.cmake
parentc41c68bfa437d4ea1b2ae5153f6f20430c47d902 (diff)
downloadCMake-2aeab4f973144fe859d5751e969512a92ae08d96.zip
CMake-2aeab4f973144fe859d5751e969512a92ae08d96.tar.gz
CMake-2aeab4f973144fe859d5751e969512a92ae08d96.tar.bz2
Borland can't do deprecated.
Diffstat (limited to 'Modules/GenerateExportHeader.cmake')
-rw-r--r--Modules/GenerateExportHeader.cmake12
1 files 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()