Qt4Macros: Port to use message(DEPRECATION)
This commit is contained in:
parent
509c142a3f
commit
f69606d335
@ -355,15 +355,7 @@ endmacro()
|
|||||||
|
|
||||||
macro(QT4_AUTOMOC)
|
macro(QT4_AUTOMOC)
|
||||||
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
|
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
|
||||||
if(CMAKE_WARN_DEPRECATED)
|
message(DEPRECATION "The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead.")
|
||||||
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()
|
|
||||||
endif()
|
endif()
|
||||||
QT4_GET_MOC_FLAGS(_moc_INCS)
|
QT4_GET_MOC_FLAGS(_moc_INCS)
|
||||||
|
|
||||||
@ -476,15 +468,7 @@ endmacro()
|
|||||||
|
|
||||||
function(qt4_use_modules _target _link_type)
|
function(qt4_use_modules _target _link_type)
|
||||||
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
|
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
|
||||||
if(CMAKE_WARN_DEPRECATED)
|
message(DEPRECATION "The qt4_use_modules function is obsolete. Use target_link_libraries with IMPORTED targets instead.")
|
||||||
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()
|
|
||||||
endif()
|
endif()
|
||||||
if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE")
|
if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE")
|
||||||
set(modules ${ARGN})
|
set(modules ${ARGN})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CMake Warning at .*/Modules/Qt4Macros.cmake:[^ ]+ \(message\):
|
CMake Deprecation Warning at .*/Modules/Qt4Macros.cmake:[^ ]+ \(message\):
|
||||||
The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead.
|
The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead.
|
||||||
Call Stack \(most recent call first\):
|
Call Stack \(most recent call first\):
|
||||||
AutomocMacro-WARN.cmake:7 \(qt4_automoc\)
|
AutomocMacro-WARN.cmake:7 \(qt4_automoc\)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CMake Warning at .*/Modules/Qt4Macros.cmake:[^ ]+ \(message\):
|
CMake Deprecation Warning at .*/Modules/Qt4Macros.cmake:[^ ]+ \(message\):
|
||||||
The qt4_use_modules function is obsolete. Use target_link_libraries with
|
The qt4_use_modules function is obsolete. Use target_link_libraries with
|
||||||
IMPORTED targets instead.
|
IMPORTED targets instead.
|
||||||
Call Stack \(most recent call first\):
|
Call Stack \(most recent call first\):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user