Browse Source

Add the COMPILER_HAS_DEPRECATED only if it has a declspec variant

_check_cxx_compiler_attribute does it in the alternative.
Stephen Kelly 14 years ago
parent
commit
df4615e338
1 changed files with 1 additions and 2 deletions
  1. 1 2
      Modules/GenerateExportHeader.cmake

+ 1 - 2
Modules/GenerateExportHeader.cmake

@@ -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})