No subject


Wed Oct 5 12:28:58 EDT 2011


registered in the custombuild.command.1.tlog file that is put into the
%(Intermediate Directory) location of the project.  Since this location is
generally different for Debug and Release builds, each configuration needs
to run *all* the custom build rules at least once to populate this file.
This the output from MSBuild when more detailed logging is enabled.

                     Forcing rebuild of all source files due to missing
command tlog
"D:\win7x64\bugs\cmake-extra-build\VS-2010\cat-file\Release\custombuild.command.1.tlog".
(TaskId:14)

I'm not sure how to work around this aside from putting all non
configuration dependent targets into a special project that has an
intermediate directory that isn't %(Configuration) dependent.  That doesn't
seem like a lot of fun.

Why MSBuild can't simply just populate the files without actually running
the build commands if the dependencies are met seems like a little bit like
a "missing feature", however it could be the mechanism to determine
dependencies relies on that file being populated.

Unfortunately for me where I have *many* non-configuration dependent custom
build rules I have to rebuild all the files for each configuration. :(

James

--20cf305b122471c45204aea4bd9f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 5, 2011 at 3:45 PM, James Bigler <span dir=3D"ltr">&lt;<a href=
=3D"mailto:jamesbigler at gmail.com">jamesbigler at gmail.com</a>&gt;</span> wrot=
e:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class=3D"h5">On Fri, Aug 19, 2011 at 10:41 AM, David C=
ole <span dir=3D"ltr">&lt;<a href=3D"mailto:david.cole at kitware.com" target=
=3D"_blank">david.cole at kitware.com</a>&gt;</span> wrote:<br><div class=3D"g=
mail_quote">

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<div><div></div><div>On Thu, Aug 18, 2011 at 4:56 PM, David Cole &lt;<a hre=
f=3D"mailto:david.cole at kitware.com" target=3D"_blank">david.cole at kitware.co=
m</a>&gt; wrote:<br>
&gt; On Thu, Aug 18, 2011 at 1:30 PM, David Cole &lt;<a href=3D"mailto:davi=
d.cole at kitware.com" target=3D"_blank">david.cole at kitware.com</a>&gt; wrote:=
<br>
&gt;&gt; On Tue, Aug 9, 2011 at 6:19 PM, James Bigler &lt;<a href=3D"mailto=
:jamesbigler at gmail.com" target=3D"_blank">jamesbigler at gmail.com</a>&gt; wro=
te:<br>
&gt;&gt;&gt; I recently switched to 2.8.5 and noticed something strange.<br=
>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I have several files that build into a Debug|Release agnostic =
place.=A0 If I<br>
&gt;&gt;&gt; build it in one then switch to the other the files don&#39;t r=
egenerate, because<br>
&gt;&gt;&gt; the build rule has been satisfied.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; With CMake 2.8.5 and VS 2010 I noticed something strange.=A0 I=
t wanted to<br>
&gt;&gt;&gt; build the files in both debug and release.=A0 I then looked at=
 the vsproj<br>
&gt;&gt;&gt; files and I noticed this:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; =A0=A0=A0=A0=A0 &lt;Outputs<br>
&gt;&gt;&gt; Condition=3D&quot;&#39;$(Configuration)|$(Platform)&#39;=3D=3D=
&#39;RelWithDebInfo|Win32&#39;&quot;&gt;C:\code\build-32-vs10-c40\lib\myfil=
e_build.txt;%(Outputs)&lt;/Outputs&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; %(Outputs)???=A0 Why is that in there.=A0 If I manually remove=
 $(Outputs) then<br>
&gt;&gt;&gt; it stops rebuilding my files.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; James<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; cmake-developers mailing list<br>
&gt;&gt;&gt; <a href=3D"mailto:cmake-developers at cmake.org" target=3D"_blank=
">cmake-developers at cmake.org</a><br>
&gt;&gt;&gt; <a href=3D"http://public.kitware.com/cgi-bin/mailman/listinfo/=
cmake-developers" target=3D"_blank">http://public.kitware.com/cgi-bin/mailm=
an/listinfo/cmake-developers</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; The &quot;%(Attribute)&quot; notation means inherit the value from=
 the same<br>
&gt;&gt; element in my &quot;parent&quot;. So for a file&#39;s attribute, i=
t typically<br>
&gt;&gt; inherits the value from the same named attribute in the project.<b=
r>
&gt;&gt;<br>
&gt;&gt; In this case, I&#39;m not entirely sure why it&#39;s there, but it=
&#39;s been<br>
&gt;&gt; there right from the very first commit adding the VS 10 generator =
to<br>
&gt;&gt; CMake: <a href=3D"http://cmake.org/gitweb?p=3Dcmake.git;a=3Dcommit=
diff;h=3D7491f529" target=3D"_blank">http://cmake.org/gitweb?p=3Dcmake.git;=
a=3Dcommitdiff;h=3D7491f529</a><br>
&gt;&gt;<br>
&gt;&gt; I can&#39;t think of the reason why it might be needed off the top=
 of my<br>
&gt;&gt; head, so ... I&#39;ll try to remove it and see if all the tests pa=
ss. If<br>
&gt;&gt; they do, I suppose it should be ok to remove it. Does anybody else=
<br>
&gt;&gt; reading this thread have any other information?<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt; David<br>
&gt;&gt;<br>
&gt;<br>
&gt; I constructed a custom build command that runs a batch file and<br>
&gt; outputs a text file solely via the VS10 IDE... and there was no<br>
&gt; &quot;%(Outputs)&quot; in the vcxproj file. So I think it&#39;s safe t=
o remove this.<br>
&gt; I&#39;ll push a change that does that.<br>
&gt;<br>
&gt; Thanks for the report,<br>
&gt; David<br>
&gt;<br>
<br>
</div></div>This bug is quite possibly a report of the same thing, although=
, as<br>
noted in the bug, I could not reproduce the problem:<br>
<a href=3D"http://public.kitware.com/Bug/view.php?id=3D12302" target=3D"_bl=
ank">http://public.kitware.com/Bug/view.php?id=3D12302</a><br>
</blockquote></div><br></div></div>Drat!<br><br>This doesn&#39;t actually s=
eem to help.=A0 I&#39;ll see if I can create a smaller test program that il=
lustrates the issue.<br><br>Does anyone know of a way to figure out why VS =
wants to build something similar to a &quot;make -d&quot;?<br>


<br>It would be really helpful to understand what is causing VS to rebuild =
stuff.<br><font color=3D"#888888"><br>James<br>
</font></blockquote></div><br>I&#39;ve been buried in this for the past day=
 and I think I might know what is going on.=A0 Unfortunately there doesn&#3=
9;t appear to be an elegant solution to this other than perhaps filing a bu=
g with Microsoft.<br>

<br>From my experimentation, it appears that custom build rules require bei=
ng registered in the custombuild.command.1.tlog file that is put into the %=
(Intermediate Directory) location of the project.=A0 Since this location is=
 generally different for Debug and Release builds, each configuration needs=
 to run *all* the custom build rules at least once to populate this file.=
=A0 This the output from MSBuild when more detailed logging is enabled.<br>

<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Forcing re=
build of all source files due to missing command tlog &quot;D:\win7x64\bugs=
\cmake-extra-build\VS-2010\cat-file\Release\custombuild.command.1.tlog&quot=
;. (TaskId:14)<br><br>I&#39;m not sure how to work around this aside from p=
utting all non configuration dependent targets into a special project that =
has an intermediate directory that isn&#39;t %(Configuration) dependent.=A0=
 That doesn&#39;t seem like a lot of fun.<br>

<br>Why MSBuild can&#39;t simply just populate the files without actually r=
unning the build commands if the dependencies are met seems like a little b=
it like a &quot;missing feature&quot;, however it could be the mechanism to=
 determine dependencies relies on that file being populated.<br>

<br>Unfortunately for me where I have *many* non-configuration dependent cu=
stom build rules I have to rebuild all the files for each configuration. :(=
<br><br>James<br>

--20cf305b122471c45204aea4bd9f--


More information about the cmake-developers mailing list