aboutsummaryrefslogtreecommitdiff
path: root/KF5ConfigMacros.cmake
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2016-11-07 00:53:06 +0100
committerl10n daemon script <scripty@kde.org>2016-11-07 12:18:27 +0000
commitfcd5502027dc5a3e1adbd98bdb8878ce52a8e248 (patch)
tree8789f3f615304681fae06e13c3bac650acb92c6b /KF5ConfigMacros.cmake
parentb3012aa02dc333d14250c8ace14687ecac61252e (diff)
downloadkconfig-5.28.0-rc2.tar.gz
kconfig-5.28.0-rc2.tar.bz2
Make sure we don't break compilation with past broken unitsv5.28.0-rc2v5.28.0
Summary: Show a warning together with the old broken behavior Reviewers: #frameworks, dfaure Reviewed By: dfaure Differential Revision: https://phabricator.kde.org/D3287 (cherry picked from commit ab9d76d7c012aa1a07a942cf50f33616bd49605f)
Diffstat (limited to 'KF5ConfigMacros.cmake')
-rw-r--r--KF5ConfigMacros.cmake10
1 files changed, 8 insertions, 2 deletions
diff --git a/KF5ConfigMacros.cmake b/KF5ConfigMacros.cmake
index 17861a74..bf72ea0b 100644
--- a/KF5ConfigMacros.cmake
+++ b/KF5ConfigMacros.cmake
@@ -71,8 +71,14 @@ function (KCONFIG_ADD_KCFG_FILES _sources )
string(REGEX MATCH "File=([^\n]+\\.kcfg)\n" "" "${_contents}")
set(_kcfg_FILENAME "${CMAKE_MATCH_1}")
if (NOT _kcfg_FILENAME)
- set(_kcfg_FILENAME "${_basename}.kcfg")
- message(WARNING "Couldn't read the \"File\" field in ${_tmp_FILE}")
+ string(REGEX MATCH "File=([^\n]+\\.kcfg).*\n" "" "${_contents}")
+ if(CMAKE_MATCH_1)
+ message(WARNING "${_tmp_FILE}: Broken \"File\" field, make sure it's pointing at the right file")
+ set(_kcfg_FILENAME "${CMAKE_MATCH_1}")
+ else()
+ message(WARNING "Couldn't read the \"File\" field in ${_tmp_FILE}")
+ set(_kcfg_FILENAME "${_basename}.kcfg")
+ endif()
endif()
set(_src_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
set(_header_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)