[cmake-developers] Strange VS output file field

David Cole david.cole at kitware.com
Fri Aug 19 12:41:34 EDT 2011


On Thu, Aug 18, 2011 at 4:56 PM, David Cole <david.cole at kitware.com> wrote:
> On Thu, Aug 18, 2011 at 1:30 PM, David Cole <david.cole at kitware.com> wrote:
>> On Tue, Aug 9, 2011 at 6:19 PM, James Bigler <jamesbigler at gmail.com> wrote:
>>> I recently switched to 2.8.5 and noticed something strange.
>>>
>>> I have several files that build into a Debug|Release agnostic place.  If I
>>> build it in one then switch to the other the files don't regenerate, because
>>> the build rule has been satisfied.
>>>
>>> With CMake 2.8.5 and VS 2010 I noticed something strange.  It wanted to
>>> build the files in both debug and release.  I then looked at the vsproj
>>> files and I noticed this:
>>>
>>>       <Outputs
>>> Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:\code\build-32-vs10-c40\lib\myfile_build.txt;%(Outputs)</Outputs>
>>>
>>> %(Outputs)???  Why is that in there.  If I manually remove $(Outputs) then
>>> it stops rebuilding my files.
>>>
>>> James
>>>
>>>
>>> _______________________________________________
>>> cmake-developers mailing list
>>> cmake-developers at cmake.org
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>>>
>>>
>>
>> The "%(Attribute)" notation means inherit the value from the same
>> element in my "parent". So for a file's attribute, it typically
>> inherits the value from the same named attribute in the project.
>>
>> In this case, I'm not entirely sure why it's there, but it's been
>> there right from the very first commit adding the VS 10 generator to
>> CMake: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7491f529
>>
>> I can't think of the reason why it might be needed off the top of my
>> head, so ... I'll try to remove it and see if all the tests pass. If
>> they do, I suppose it should be ok to remove it. Does anybody else
>> reading this thread have any other information?
>>
>> Thanks,
>> David
>>
>
> I constructed a custom build command that runs a batch file and
> outputs a text file solely via the VS10 IDE... and there was no
> "%(Outputs)" in the vcxproj file. So I think it's safe to remove this.
> I'll push a change that does that.
>
> Thanks for the report,
> David
>

This bug is quite possibly a report of the same thing, although, as
noted in the bug, I could not reproduce the problem:
http://public.kitware.com/Bug/view.php?id=12302



More information about the cmake-developers mailing list