Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
f69606d3
Commit
f69606d3
authored
Sep 17, 2013
by
Stephen Kelly
Browse files
Qt4Macros: Port to use message(DEPRECATION)
parent
509c142a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Modules/Qt4Macros.cmake
View file @
f69606d3
...
...
@@ -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
}
)
...
...
Tests/RunCMake/ObsoleteQtMacros/AutomocMacro-WARN-stderr.txt
View file @
f69606d3
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.
Call Stack \(most recent call first\):
AutomocMacro-WARN.cmake:7 \(qt4_automoc\)
...
...
Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN-stderr.txt
View file @
f69606d3
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
IMPORTED targets instead.
Call Stack \(most recent call first\):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment