<div class="gmail_quote">On Mon, Jul 26, 2010 at 3:12 PM, John Drescher <span dir="ltr">&lt;<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Mon, Jul 26, 2010 at 3:03 PM, Olaf van der Spek &lt;<a href="mailto:olafvdspek@gmail.com">olafvdspek@gmail.com</a>&gt; wrote:<br>
&gt; On Mon, Jul 26, 2010 at 9:00 PM, John Drescher &lt;<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>&gt; wrote:<br>
&gt;&gt; You need to add variables and such. I believe that is done in windows-cl.cmake<br>
&gt;<br>
&gt; I&#39;d like to generate both dynamic and static, x86 and x64 configs.<br>
&gt; CMake already knows how to build those, so it&#39;s not about adding<br>
&gt; variables for those.<br>
&gt;<br>
<br>
</div></div>I believe you still need to fill in the details for the new<br>
configurations. Here is part of Windows-cl.cmake<br>
<br>
SET (CMAKE_CXX_FLAGS_INIT &quot;/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR&quot;)<br>
SET (CMAKE_CXX_FLAGS_DEBUG_INIT &quot;/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1&quot;)<br>
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT &quot;/MD /O1 /Ob1 /D NDEBUG&quot;)<br>
SET (CMAKE_CXX_FLAGS_RELEASE_INIT &quot;/MD /O2 /Ob2 /D NDEBUG&quot;)<br>
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT &quot;/MD /Zi /O2 /Ob1 /D NDEBUG&quot;)<br>
<br>
As for 64bit / 32 bit I do not think this is a simple modification to<br>
allow 64bit and be 100% correct.<br>
<font color="#888888"><br></font></blockquote><div><br></div><div>Olaf,</div><div><br></div><div>It&#39;s definitely not easy to make such a modification with the current VS generators. For better or for worse, there are currently separate generators for Visual Studio 32-bit and 64-bit projects. It would be a major re-working of those separate generators to combine them into a single one that chose the architecture at *build* time rather than at configure time.</div>
<div><br></div><div>Many projects already have logic in their CMakeLists.txt files that goes something like this:</div><div>if(CMAKE_SIZEOF_VOID_P EQUAL 8)</div><div>  # do 64-bit stuff at *configure* time...</div><div>else()</div>
<div>  # 32-bit stuff</div><div>endif()</div><div><br></div><div>If you make *configure* time decisions based on architecture, then it&#39;s not easy to support multiple architectures without multiple configures. (Multiple build trees...)</div>
<div><br></div><div>Since this is a prevalent scheme that is widely used by folks coming from single-config, single-architecture (makefile based) build systems... it&#39;s the way CMake has gotten to the point it&#39;s at now. I&#39;m not saying this is good or bad, just explaining that this is the way it is, and that there are historical reasons why we got to this point.</div>
<div><br></div><div>So.... what you&#39;re attempting is probably possible, but it&#39;s definitely not easy. And it will probably require some significant re-work of the existing code.</div><div><br></div><div>Let us know if you have any other specific questions that we can answer for you.</div>
<div><br></div><div><br></div><div>Hope this helps,</div><div>David Cole</div><div>Kitware, Inc.</div><div><br></div></div>