diff options
author | Brad King <brad.king@kitware.com> | 2013-10-09 14:24:16 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-10-09 14:24:16 (GMT) |
commit | be9d289fcef487753a5c88268e9ed4262e39633b (patch) | |
tree | 40564b3e417c7fdea74b69dae5f6c99e3c2aad3c /Modules | |
parent | f33068f6157bf1cbba2f37df0f41c80aa5fb19a5 (diff) | |
parent | f973737305aaa48ddf26f4455bdc8acdd7d03573 (diff) | |
download | CMake-be9d289fcef487753a5c88268e9ed4262e39633b.zip CMake-be9d289fcef487753a5c88268e9ed4262e39633b.tar.gz CMake-be9d289fcef487753a5c88268e9ed4262e39633b.tar.bz2 |
Merge topic 'deprecation-message'
f973737 GenerateExportHeader: Port to use message(DEPRECATION)
f69606d Qt4Macros: Port to use message(DEPRECATION)
509c142 message: Add a DEPRECATION mode
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/GenerateExportHeader.cmake | 10 | ||||
-rw-r--r-- | Modules/Qt4Macros.cmake | 20 |
2 files changed, 3 insertions, 27 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index b2fda09..fb113a7 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -337,15 +337,7 @@ endfunction() function(add_compiler_export_flags) if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12) - if(CMAKE_WARN_DEPRECATED) - set(messageType WARNING) - endif() - if(CMAKE_ERROR_DEPRECATED) - set(messageType FATAL_ERROR) - endif() - if(messageType) - message(${messageType} "The add_compiler_export_flags function is obsolete. Use the CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target properties instead.") - endif() + message(DEPRECATION "The add_compiler_export_flags function is obsolete. Use the CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target properties instead.") endif() _test_compiler_hidden_visibility() diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index f1aedd7..74bad89 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -355,15 +355,7 @@ endmacro() macro(QT4_AUTOMOC) if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11) - if(CMAKE_WARN_DEPRECATED) - set(messageType WARNING) - endif() - if(CMAKE_ERROR_DEPRECATED) - set(messageType FATAL_ERROR) - endif() - if(messageType) - message(${messageType} "The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead.") - endif() + message(DEPRECATION "The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead.") endif() QT4_GET_MOC_FLAGS(_moc_INCS) @@ -476,15 +468,7 @@ endmacro() function(qt4_use_modules _target _link_type) if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11) - if(CMAKE_WARN_DEPRECATED) - set(messageType WARNING) - endif() - if(CMAKE_ERROR_DEPRECATED) - set(messageType FATAL_ERROR) - endif() - if(messageType) - message(${messageType} "The qt4_use_modules function is obsolete. Use target_link_libraries with IMPORTED targets instead.") - endif() + message(DEPRECATION "The qt4_use_modules function is obsolete. Use target_link_libraries with IMPORTED targets instead.") endif() if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE") set(modules ${ARGN}) |