<div dir="ltr">Hi Philippe,<div><br></div><div>I suppose my advantage is that I've used cmake enough that I trust it, so</div><div>when I get a massive build failure, I suspect the compiler ;) For example,</div><div>I've run into situations very similar to yours on linux because I forgot to</div><div>install some devel package.</div><div><br></div><div>No, cmake doesn't check anything except whether the TryCompile failed</div><div>or succeeded (unfortunately). I can see that if it fails for silly reasons like</div><div>path length, it would be nice if it said so!</div><div><br></div><div>As an aside, I've switched to using ninja for all my MSVC builds, because</div><div>it really cuts down on the build time. Especially for my Win7 machine, which</div><div>is just an old VM on a really, really old linux box.</div><div><br></div><div> - David</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 2, 2015 at 4:50 PM, Philippe Bouttefroy <span dir="ltr"><<a href="mailto:pbouttefroy@nvidia.com" target="_blank">pbouttefroy@nvidia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi David,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thank you so much! This put me on the right track. So, here we go - don’t laugh ;) because I’ve spend about 2 days trying to figure out what’s going on (and I
could have spent more time without your help):<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(308,5): error MSB3491: Could not write lines to file "cmTryCompileExec1051036387.dir\Debug\cmTryCom.F2889911.tlog\cmTryCompileExec1051036387.lastbuildstate".
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">This had nothing to do with my VM at all. I was thinking: is there a way to detect this kind of issues in CMake? But I assume that CMake only gets the result
of compilation, and does not care too much about the cause.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">In any case, thank you so much!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Best,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Philippe</span><b><span style="font-family:"Calibri",sans-serif;color:black"><u></u><u></u></span></b></p>
<p class="MsoNormal"><a name="14c7c69d196abd5f_14c7c542b445b167__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></a></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> David Gobbi [mailto:<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>]
<br>
<b>Sent:</b> Thursday, April 02, 2015 2:35 PM<br>
<b>To:</b> Philippe Bouttefroy<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a></span></p><div><div><br>
<b>Subject:</b> Re: [vtkusers] VTK-6.1 and Visual Studio 2013 on VirtualBox<u></u><u></u></div></div><p></p><div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">This might be a silly question, but has this VS2013 installation built anything<u></u><u></u></p>
<div>
<p class="MsoNormal">other than VTK? Check the file CMakeFiles/CMakeError.log, it might provide<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">some clues (e.g. maybe a TryCompile failed when it shouldn't have.)<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> - David<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Thu, Apr 2, 2015 at 2:54 PM, Philippe Bouttefroy <<a href="mailto:pbouttefroy@nvidia.com" target="_blank">pbouttefroy@nvidia.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal">Hi David, hi Ben,<br>
<br>
Thanks for looking into the issue! Unfortunately, CMake 2.8.12 did not resolve my issue. I can send the CMake output, if you would like.<br>
<br>
However, what I observed is that the first errors that I get with VS2013 is that it is looking for <iostream.h> instead of <iostream> (in /build/Utilities/KWSys/ios/iostream) because vtksys_IOS_USE_ANSI is not set. Furthermore, CMake outputs:<br>
“Checking whether ANSI stream headers are available – no”. I would have expected “yes” instead. I tried to dig into how the value was determined but could not figure it out.<br>
<br>
Do you have any clue on whether this is the root cause of my issue? Any idea on how to debug this?<br>
<br>
Again, thanks for your time!<br>
<br>
Best,<br>
Philippe<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
-----Original Message-----<br>
From: Ben Boeckel [mailto:<a href="mailto:ben.boeckel@kitware.com" target="_blank">ben.boeckel@kitware.com</a>]<br>
Sent: Thursday, April 02, 2015 1:49 PM<br>
To: David Gobbi<br>
Cc: Philippe Bouttefroy; <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
Subject: Re: [vtkusers] VTK-6.1 and Visual Studio 2013 on VirtualBox<br>
<br>
On Thu, Apr 02, 2015 at 12:50:10 -0600, David Gobbi wrote:<br>
> Hi Philippe,<br>
><br>
> Around a year ago, I did a 64-bit build of VTK 6.1 (or thereabouts)<br>
> with Visual Studio 2013 Express on Win7-64 running on VirtualBox. I<br>
> didn't run into any errors like the one you describe above.<br>
><br>
><br>
> I suspect that all the errors are related to this:<br>
><br>
> CMake Warning (dev) at Utilities/KWSys/vtksys/CMakeLists.txt:264<br>
> (CONFIGURE_FILE):<br>
> configure_file called with unknown argument(s): COPY_ONLY<br>
><br>
> You're using a version of CMake 3.x that expects cmake files to use<br>
> COPYONLY instead of the older COPY_ONLY. Try cmake 2.8.12, and I bet<br>
> the problem will disappear.<br>
<br>
This isn't an error but a warning. CMake 3 is informing that COPY_ONLY is no longer supported.<br>
<br>
> Does anyone else know why CMake 3 would be giving this error? It<br>
> seems like a nasty bit of backwards-incompatibility.<br>
<br>
The real problems are probably pointed out by CMP0054. Places which<br>
check:<br>
<br>
set(compiler "MSVC")<br>
if (compiler STREQUAL "MSVC")<br>
<br>
turn into:<br>
<br>
if (MSVC STREQUAL 1)<br>
<br>
and are therefore *false* because MSVC is defined as "1" with it and not defined otherwise and "if" automatically dereferences. The new behavior is that quoted strings are not considered for automatic expansion thereby pointing out probable errors in the previous
code. My guess is that MSVC detection needed is being skipped somewhere because of the bugs pointed out (*not* caused) by CMP0054.<br>
<br>
--Ben<u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
<div>
<hr>
</div><span>
<div>This email message is for the sole use of the intended recipient(s) and may
contain confidential information. Any unauthorized review, use, disclosure
or distribution is prohibited. If you are not the intended recipient,
please contact the sender by reply email and destroy all copies of the original
message. </div>
</span><div>
<hr>
</div>
</div>
</blockquote></div><br></div></div></div>