MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0012644 | CMake | Modules | public | 2011-12-31 09:17 | 2012-09-03 16:01 |
Reporter | Bernd Lörwald | ||||
Assigned To | Clinton Stimpson | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Apple | OS | Mac OSX | OS Version | 10.7.2 |
Product Version | CMake 2.8.6 | ||||
Target Version | CMake 2.8.8 | Fixed in Version | CMake 2.8.8 | ||
Summary | 0012644: Modules/Qt4Macros.cmake: qt4_create_translation: missing include paths | ||||
Description | The macro does not give lupdate the include paths given in the makefile, therefore lupdate produces warnings like "Qualifying with unknown namespace/class ::Foo" and possibly bad files. lupdate needs the class definition to not throw these warnings. | ||||
Steps To Reproduce | As found in the attachment: ./CMakeLists.txt ./src/foo.cpp ./src/foo.h CMakeLists: ... include_directories (${CMAKE_CURRENT_SOURCE_DIR}) # ./ qt4_create_translation (QM_FILES ${SOURCE} ${TRANSLATIONS}) qt4_add_translation (QM ${TRANSLATIONS}) ... src/foo.cpp: #include <src/foo.h> ... void Foo::greet() const { qDebug() << tr ("greeting"); } ... [ 20%] Generating ../translation.ts src/foo.cpp:8: Qualifying with unknown namespace/class ::Foo | ||||
Additional Information | The macro uses an temporary .pro file "CMakeFiles/translation_lupdate.pro". This includes only "SOURCES=../src/foo.cpp", while it should also include "INCLUDEPATH=..". To fix this, do: - FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}") + # TODO: get paths into ${include_paths} + SET(_pro_includes) + FOREACH(_pro_include ${include_paths}) + GET_FILENAME_COMPONENT(_abs_include "${CMAKE_BINARY_DIR}/${_pro_include}" ABSOLUTE) + SET(_pro_includes "${_pro_includes} \"${_abs_include}\"") + ENDFOREACH(_pro_include ${CMAKE_CXX_INCLUDE_PATH}) + FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}\nINCLUDEPATH = ${_pro_includes}\n") I do not know how to get the include paths though. That's for you to fix. | ||||
Tags | qt | ||||
Relationships | |||||
Attached Files | lupdate_example.zip (2,477) 2011-12-31 09:17 https://public.kitware.com/Bug/file/4152/lupdate_example.zip | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2011-12-31 09:17 | Bernd Lörwald | New Issue | |||
2011-12-31 09:17 | Bernd Lörwald | File Added: lupdate_example.zip | |||
2011-12-31 09:20 | Bernd Lörwald | Tag Attached: qt | |||
2011-12-31 09:26 | Bernd Lörwald | Note Added: 0028080 | |||
2012-01-02 13:24 | Brad King | Assigned To | => Clinton Stimpson | ||
2012-01-02 13:24 | Brad King | Status | new => assigned | ||
2012-02-08 21:02 | Clinton Stimpson | Note Added: 0028536 | |||
2012-02-08 21:02 | Clinton Stimpson | Status | assigned => resolved | ||
2012-02-08 21:02 | Clinton Stimpson | Resolution | open => fixed | ||
2012-04-19 15:43 | David Cole | Fixed in Version | => CMake 2.8.8 | ||
2012-04-19 15:43 | David Cole | Target Version | => CMake 2.8.8 | ||
2012-09-03 16:01 | David Cole | Note Added: 0030871 | |||
2012-09-03 16:01 | David Cole | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|