View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016103CMakeCMakepublic2016-05-13 06:362016-06-10 14:31
ReporterOregonGhost 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSWindowsOS Version10
Product VersionCMake 3.5.2 
Target VersionFixed in Version 
Summary0016103: AUTORCC will not regenerate qrc when a resource changes
DescriptionI am using CMake with Visual C++ (2010 & 2013) and Qt 5.4. My primary target has a qrc file listed as source. AUTOMOC, AUTORCC and AUTOUIC are ON.

When the qrc file itself is changed, rcc is called.
When a resource the qrc file links to is changed, rcc is not called.

As a result, CMake happily builds an executable with old resources, unless the qrc has been changed.

According to 0015074, this should work for some time now. It did not for me with CMake 3.2, which I was using until recently, nor with 3.5.2, which I have currently installed.
Steps To ReproduceRelevant portions of CMakeLists.txt:

set(CMAKE_AUTORCC ON)
...
find_package(Qt5Core REQUIRED)
...
set( my_sources ... my.qrc )
...
add_executable( my WIN32 ... ${my_sources} )

Example from my.qrc:

<RCC>
    <qresource prefix="/Bullets">
        <file alias="Blue">Resources/Tags/BulletBlue.png</file>
    </qresource>
</RCC>

=> Change BulletBlue.png and qrc_my.cpp is NOT regenerated, nor recompiled.
Additional InformationRunning on Windows 10, currently with Visual C++ 2013, but the problem also happens on Windows 7 and with Visual C++ 2010.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0041063)
OregonGhost (reporter)
2016-05-13 07:47
edited on: 2016-05-13 07:48

I don't know if it has the same origin, but I discovered another issue. As a work-around, one would typically just rebuild all (i.e. clean + build), which should rebuild everything (and which I found as a workaround for issues like this with CMake, though typically with make clean && make all). However, it seems that the generated files are not cleaned from Visual Studio, including the qrc_*.cpp and the moc_*.cpp files. This means that not even with this workaround I get a rebuilt qrc, I have to manually remove the files before rebuild.

I did not seem to find a simple way to trigger regenerating the files.

This is only an issue while developing (i.e. when trying out different icons etc.) though, since our build server performs a clean checkout anyway.

(0043003)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

- Issue History
Date Modified Username Field Change
2016-05-13 06:36 OregonGhost New Issue
2016-05-13 07:47 OregonGhost Note Added: 0041063
2016-05-13 07:48 OregonGhost Note Edited: 0041063 View Revisions
2016-06-10 14:29 Kitware Robot Note Added: 0043003
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker