Hi <span class="gD">Sarnath, <br><br>Could you create an issue in the tracked where you will describe the problem, the work around and also attach the configure.bat file ?<br><br>I am sure that will be helpful in solving the problem.<br>

<br>If there is already an issue .. could you mention the corresponding # number ?<br><br>Thanks for your help<br>Jc<br></span><br><div class="gmail_quote">On Fri, Feb 3, 2012 at 7:34 AM, Sarnath K - ERS, HCLTech <span dir="ltr">&lt;<a href="mailto:k_sarnath@hcl.com">k_sarnath@hcl.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I managed to find a workaround.<br>
<br>
Instead of allowing CMAKE to work out the configuration and build of the  external CMAKE project,<br>
I just wrote a batch file (configure.bat) which would invoke &quot;cmake&quot; internally to generate the makefiles.<br>
After that, I could use &quot;cmake --build&quot; command to build the external project.<br>
<br>
With these workarounds, I was able to generate a 32-bit tool alongside 64-bit executables and 64-bit libraries.<br>
<br>
Sigh of relief!! But CMAKE authors would want to look into this issue,<br>
<div class="im HOEnZb"><br>
Thanks,<br>
Best Regards,<br>
Sarnath<br>
<br>
-----Original Message-----<br>
</div><div class="HOEnZb"><div class="h5">From: <a href="mailto:cmake-bounces@cmake.org">cmake-bounces@cmake.org</a> [mailto:<a href="mailto:cmake-bounces@cmake.org">cmake-bounces@cmake.org</a>] On Behalf Of Sarnath K - ERS, HCLTech<br>


Sent: Friday, February 03, 2012 10:48 AM<br>
To: John Drescher<br>
Cc: <a href="mailto:cmake@cmake.org">cmake@cmake.org</a><br>
Subject: Re: [CMake] CMAKE 2.8.5 - CMAKE_GENERATOR Bug?<br>
<br>
Hello John,<br>
<br>
I can +vely see this behavior with the latest 2.8.7 version as well.<br>
I am using a windows 64-bit machine with Visual studio 2008 installed on it.<br>
<br>
This is how I use Externa Project Add command:<br>
&quot;<br>
    include(ExternalProject)<br>
    ExternalProject_Add(<br>
        gen<br>
        CMAKE_GENERATOR &quot;Visual Studio 9 2008&quot;<br>
        URL file://${CMAKE_SOURCE_DIR}/src/tools/gen<br>
        INSTALL_COMMAND &quot;&quot;<br>
    )<br>
&quot;<br>
<br>
The CMakeLists.txt hosting this ExternalProject_Add is generated using &quot;NMake Makefiles&quot; - which uses the default 64-bit build configuration.<br>
A verbose Makefile generation nails the issue.<br>
The &quot;gen&quot; project is generated as &lt;cmake &quot;-G Visual Studio 9 2008&quot;&gt; which screws things up.<br>
<br>
Can somebody please help me with this?<br>
<br>
Thanks,<br>
Best Regards,<br>
Sarnath<br>
-----Original Message-----<br>
From: John Drescher [mailto:<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>]<br>
Sent: Thursday, February 02, 2012 11:12 PM<br>
To: Sarnath K - ERS, HCLTech<br>
Cc: <a href="mailto:cmake@cmake.org">cmake@cmake.org</a><br>
Subject: Re: [CMake] CMAKE 2.8.5 - CMAKE_GENERATOR Bug?<br>
<br>
On Thu, Feb 2, 2012 at 12:33 PM, Sarnath K - ERS, HCLTech<br>
&lt;<a href="mailto:k_sarnath@hcl.com">k_sarnath@hcl.com</a>&gt; wrote:<br>
&gt; All,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I was trying to use the external project add feature to add a 32-bit VC++<br>
&gt; project on a 64-bit parent build system.<br>
&gt;<br>
&gt; However, I ran into problems while compiling the 32-bit project.<br>
&gt;<br>
&gt; &quot;devenv&quot; used to complain &quot;invalid solution configuration&quot;<br>
&gt;<br>
&gt; I tried to explicitly set &quot;CMAKE_BUILD_TYPE&quot; using -D option as well as in<br>
&gt; the CMakeLists.txt.<br>
&gt; Nothing changed.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; However, when I enabled &quot;CMAKE_VERBOSE_MAKEFILE&quot;, I found that &quot;CMAKE&quot; was<br>
&gt; &quot;not&quot; passing the -G option correctly.<br>
&gt;<br>
&gt; Instead of passing &lt;cmake -G &quot;Visual Studio 9 2008&quot;&gt;, cmake was actually<br>
&gt; configuring the project as &lt;cmake &quot;-G Visual Studio 9 2008&quot;&gt;<br>
&gt;<br>
&gt; (Note that -G is inside the double-quote)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; When I isolate the build-step and build it manually using the correct<br>
&gt; syntax, everything works flawlessly.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Specifying the generator via &quot;CMAKE_ARGS&quot; helps me compile. But CMAKE still<br>
&gt; appends the faulty -G syntax and<br>
&gt;<br>
&gt; hence is not producing the intended results for me.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; If this is indeed a bug, can some one tell me:<br>
&gt;<br>
&gt; 1.    What is the temporary workaround for this?<br>
&gt;<br>
&gt; 2.    If at all fixed, how long will it take the build to come out?<br>
&gt;<br>
<br>
I am not seeing this breakage. However you are 2 versions behind in cmake.<br>
<br>
John<br>
<br>
::DISCLAIMER::<br>
-----------------------------------------------------------------------------------------------------------------------<br>
<br>
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.<br>
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in<br>
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.<br>
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of<br>
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have<br>
received this email in error please delete it and notify the sender immediately. Before opening any mail and<br>
attachments please check them for viruses and defect.<br>
<br>
-----------------------------------------------------------------------------------------------------------------------<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>