summaryrefslogtreecommitdiffstats
path: root/Modules/GenerateExportHeader.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2011-08-13 20:33:30 (GMT)
committerStephen Kelly <steveire@gmail.com>2011-08-13 20:58:15 (GMT)
commitaed84517c942a4c40f493fcf997cdf6a047349f8 (patch)
treec9db52f467727a5fa2904bb47462537cb55becb2 /Modules/GenerateExportHeader.cmake
parentc448b09ad39c35b129d7b91710bea4f26fabdfe4 (diff)
downloadCMake-aed84517c942a4c40f493fcf997cdf6a047349f8.zip
CMake-aed84517c942a4c40f493fcf997cdf6a047349f8.tar.gz
CMake-aed84517c942a4c40f493fcf997cdf6a047349f8.tar.bz2
Test for deprecated attribute before declspec.
The attribute seems more common, and some compilers seem to silently ignore the declspec.
Diffstat (limited to 'Modules/GenerateExportHeader.cmake')
-rw-r--r--Modules/GenerateExportHeader.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index c833a01..044e2b4 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -158,11 +158,11 @@ macro(_test_compiler_hidden_visibility)
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}" CACHE INTERNAL "Compiler support for a deprecated attribute")
+ _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("__attribute__((__deprecated__))" COMPILER_HAS_DEPRECATED)
+ _check_cxx_compiler_attribute("__declspec(deprecated)" COMPILER_HAS_DEPRECATED)
endif()
endmacro()