Makes it clear why the current build is failing instead of the developer wasting
time investigating other causes. The message is styled similar to the CMake
error when it can't find a source file.
Details
Details
- Reviewers
cullmann - Group Reviewers
Framework: Syntax Highlighting Localization Build System - Commits
- R249:f56f3b211cf9: ki18n_wrap_ui: error when file doesn't exist
Diff Detail
Diff Detail
- Repository
- R249 KI18n
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
cmake/KF5I18nMacros.cmake.in | ||
---|---|---|
52 | This assumes a relative path given. It might make sense to also deal with absolute path, and only append CMAKE_CURRENT_LIST_DIR if not absolute, then check for existance? |
cmake/KF5I18nMacros.cmake.in | ||
---|---|---|
52 | Some lines below we anyways do get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE) Could we not just use the result of this for both the check + output? |
Comment Actions
Output of
cmake_minimum_required(VERSION 2.8.12) find_package(ECM) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) find_package(Qt5Widgets) find_package(KF5I18n) ki18n_wrap_ui(var test.ui) ki18n_wrap_ui(var test.uia) ki18n_wrap_ui(${CMAKE_CURRENT_SOURCE_DIR}/test.ui) ki18n_wrap_ui(/not/existing/path)
with existing test.ui next to CMakeLists.txt:
[...] CMake Error at /home/david/kde/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nMacros.cmake:55 (message): Cannot find ui file: test.ui Call Stack (most recent call first): CMakeLists.txt:7 (ki18n_wrap_ui) CMake Error at /home/david/kde/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nMacros.cmake:55 (message): Cannot find ui file: test.uia Call Stack (most recent call first): CMakeLists.txt:8 (ki18n_wrap_ui) -- Configuring incomplete, errors occurred! See also "/tmp/test/build/CMakeFiles/CMakeOutput.log".
Comment Actions
Output:
Well it seems I forgot to create the test.ui file...
Output:
CMake Error at /home/david/kde/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nMacros.cmake:56 (message): Cannot find ui file: test.uia Call Stack (most recent call first): CMakeLists.txt:7 (ki18n_wrap_ui) CMake Error at /home/david/kde/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nMacros.cmake:56 (message): Cannot find ui file: /not/existing/path Call Stack (most recent call first): CMakeLists.txt:9 (ki18n_wrap_ui) -- Configuring incomplete, errors occurred! See also "/tmp/test/build/CMakeFiles/CMakeOutput.log".
So everything seems to work correctly