[CMake] Main program not getting rebuilt when library changes.

Bill Greene w.h.greene at gmail.com
Tue Oct 7 15:00:42 EDT 2014


On Tue, Oct 7, 2014 at 2:13 PM, Bill Hoffman <bill.hoffman at kitware.com>
wrote:

> On 10/7/2014 1:29 PM, Brad King wrote:
>
>> Unfortunately I do not know where to send you from here.  I do not think
>> it is CMake bug.  The generated project is correct.  This is an extremely
>> common use case that seems to work in general.  CMake has nightly testing
>> of this use case that runs on all supported tools.
>>
>> Generic ideas to try:
>>
>> - Disable any antivirus tool you have running
>> - Re-install VS from scratch
>> - Try to reproducing this on another machine
>>
> Could it be an odd version of msbuild on the machine?  Maybe one that does
> not match the IDE you are using?  Did you install the windows SDK or some
> other software that might have put a different msbuild on the machine?
>
>
>
I see that I have (at least) two versions of MSBuild-- 4.0 and 12.0. I'm
not certain how either of them got there ;-(
I suspect that version 12 was installed when I installed/upgraded VS 2013.
I also have a couple of versions of the
windows SDK that I installed after installing VS 2010.

>From the verbose log file I generated earlier this morning, I can see this
line:
C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe -verbosity:diag
/p:VisualStudioVersion=10.0 cmTestMain/cmTestMain.vcxproj

As another experiment, I asked cmake to create a VS 2013 solution with
these same bits. After doing a verbose
build in that project, the log file shows:

C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe -verbosity:diag
/p:VisualStudioVersion=12.0 cmTestMain/cmTestMain.vcxproj

Both the VS 2010 and 2013 solutions show the same exe/lib dependency
problem. So if the culprit is MSBuild,
the problem is quite subtle.

At this point, I'm not sure we know much more than that MS has an extremely
complex and idiosyncratic build system;
something we probably knew before.

Thanks to both of you for taking the time to investigate.

Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141007/ff1e75a4/attachment-0001.html>


More information about the CMake mailing list