[CMake] set_property on sources causing extra files to be rebuilt

Clinton Stimpson clinton at elemtech.com
Tue Mar 24 18:46:29 EDT 2009


Daniel Nelson wrote:
> On Tuesday 24 March 2009 3:16:27 pm Alexander Neundorf wrote:
>   
>> On Tuesday 24 March 2009, Alexander Neundorf wrote:
>>     
>>> On Friday 20 March 2009, Daniel Nelson wrote:
>>>       
>>>> It looks like the projects flags.make is updated every time any compile
>>>> flag or definition changes, and every object file in the project
>>>> depends on flags.make. In the case of properties set using
>>>> set_property() the only part of the flags.make that changes is the
>>>> comment, so maybe it would be best to put these comments into a
>>>> different file that is not a dependency?
>>>>         
>>> Do you have the same effect when you use SET_SOURCE_FILES_PROPERTIES()
>>> instead ?
>>>       
>> I checked, it has the same behaviour, also with cmake cvs.
>> It is actually on purpose that the comments change, since this enforces the
>> rebuilding of the object files if only the flags are changed.
>> (if flags.make is generated without these comments, object files are not
>> rebuilt when the flags are changed).
>> Maybe it could be made more fine granular.
>>
>> Alex
>>     
>
> So it sounds like the only way to fix this would be to write a separate 
> flags.make file for every object file that has compile/define flags set?  I opened 
> this as issue 8787 in the bug tracker.
>   
Is your report a duplicate?
See also: http://public.kitware.com/Bug/view.php?id=8642

Clint



More information about the CMake mailing list