MantisBT - CMake
View Issue Details
0013494CMakeCMakepublic2012-08-27 12:482012-10-24 17:28
Stephen Kelly 
Alex Neundorf 
normalminoralways
closedfixed 
CMake 2.8.10 
CMake 2.8.10CMake 2.8.10 
0013494: CMake AUTOMOC does not re-run moc if includes change
If the include directories change, then moc should be re-run, as they are passed to moc:

set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Commenting and uncommenting this should re-run moc on the
# affected files, but it does not.
include_directories("test/includes")

...

CMake does re-compile the moc file or the automoc target.

Commenting a use of add_definitions() does correctly cause moc to be run.
No tags attached.
Issue History
2012-08-27 12:48Stephen KellyNew Issue
2012-08-27 12:48Stephen KellyStatusnew => assigned
2012-08-27 12:48Stephen KellyAssigned To => Alex Neundorf
2012-08-27 12:48Stephen KellyNote Added: 0030778
2012-08-27 15:41Alex NeundorfNote Added: 0030779
2012-08-27 15:50Stephen KellyNote Added: 0030780
2012-08-27 16:11Alex NeundorfNote Added: 0030782
2012-08-27 16:11Alex NeundorfStatusassigned => closed
2012-08-27 16:11Alex NeundorfResolutionopen => fixed
2012-08-27 16:11Alex NeundorfDescription Updatedbug_revision_view_page.php?rev_id=793#r793
2012-10-24 17:28David ColeFixed in Version => CMake 2.8.10
2012-10-24 17:28David ColeTarget Version => CMake 2.8.10

Notes
(0030778)
Stephen Kelly   
2012-08-27 12:48   
This is where my confusion in 0013492 came from :).
(0030779)
Alex Neundorf   
2012-08-27 15:41   
Thanks for repoting, this was so obvious I wonder how I missed this.
You can have a look at the AutomocRerunFix branch.
(0030780)
Stephen Kelly   
2012-08-27 15:50   
Thanks. It works for me.
(0030782)
Alex Neundorf   
2012-08-27 16:11   
Merged the AutomocRerunFix branch into next.