<div class="gmail_quote">On Mon, Jul 26, 2010 at 3:46 PM, Olaf van der Spek <span dir="ltr">&lt;<a href="mailto:olafvdspek@gmail.com">olafvdspek@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 class="im">On Mon, Jul 26, 2010 at 9:21 PM, David Cole &lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt; wrote:<br>
&gt; Olaf,<br>
&gt; It&#39;s definitely not easy to make such a modification with the current VS<br>
&gt; generators. For better or for worse, there are currently separate generators<br>
&gt; for Visual Studio 32-bit and 64-bit projects. It would be a major re-working<br>
&gt; of those separate generators to combine them into a single one that chose<br>
&gt; the architecture at *build* time rather than at configure time.<br>
<br>
</div>Why are there two generators?<br>
I don&#39;t see why the decision has to be made at another time.<br>
Configure time is fine with me.<br></blockquote><div><br></div><div>Maybe I&#39;m misinterpreting what you&#39;re asking. I thought you said you wanted x86 and x64 both in the same build tree. That would be not making a choice at configure time, and deferring the choice of arch to build time. But with CMake as is, it is typically a configure time choice in most projects.</div>
<div><br></div><div>As to why there are two generators, I don&#39;t understand the precise decisions behind having it done it that way. Perhaps if somebody else knows, they will chime in. (I&#39;ve lamented this fact before when folks have asked about adding config types for various phone- OSes...)</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
&gt; Many projects already have logic in their CMakeLists.txt files that goes<br>
&gt; something like this:<br>
&gt; if(CMAKE_SIZEOF_VOID_P EQUAL 8)<br>
&gt;   # do 64-bit stuff at *configure* time...<br>
&gt; else()<br>
&gt;   # 32-bit stuff<br>
&gt; endif()<br>
&gt; If you make *configure* time decisions based on architecture, then it&#39;s not<br>
&gt; easy to support multiple architectures without multiple configures.<br>
&gt; (Multiple build trees...)<br>
<br>
</div>Is there a problem with multiple configures / build trees?<br></blockquote><div><br></div><div>No, not at all. We do this all the time. But again, I thought from your questions that you were trying to do it all in one build tree.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
&gt; Since this is a prevalent scheme that is widely used by folks coming from<br>
&gt; single-config, single-architecture (makefile based) build systems... it&#39;s<br>
&gt; the way CMake has gotten to the point it&#39;s at now. I&#39;m not saying this is<br>
&gt; good or bad, just explaining that this is the way it is, and that there are<br>
&gt; historical reasons why we got to this point.<br>
&gt; So.... what you&#39;re attempting is probably possible, but it&#39;s definitely not<br>
&gt; easy. And it will probably require some significant re-work of the existing<br>
&gt; code.<br>
&gt; Let us know if you have any other specific questions that we can answer for<br>
&gt; you.<br>
<br>
</div>x64 is not a priority for me ATM.<br>
Having static configs (static lib, static runtime and static lib,<br>
dynamic runtime) is more important.<br>
<font color="#888888"><br>
Olaf<br>
</font></blockquote></div><br>