From df4615e3380cda2bf29d3dfdcfd26b020a64e707 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 12 Aug 2011 00:21:13 +0200 Subject: [PATCH] Add the COMPILER_HAS_DEPRECATED only if it has a declspec variant _check_cxx_compiler_attribute does it in the alternative. --- Modules/GenerateExportHeader.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 05f36f386..c833a014d 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/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})