<div class="gmail_quote">On Mon, Jul 26, 2010 at 3:46 PM, Olaf van der Spek <span dir="ltr"><<a href="mailto:olafvdspek@gmail.com">olafvdspek@gmail.com</a>></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 <<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>> wrote:<br>
> Olaf,<br>
> It's definitely not easy to make such a modification with the current VS<br>
> generators. For better or for worse, there are currently separate generators<br>
> for Visual Studio 32-bit and 64-bit projects. It would be a major re-working<br>
> of those separate generators to combine them into a single one that chose<br>
> the architecture at *build* time rather than at configure time.<br>
<br>
</div>Why are there two generators?<br>
I don'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'm misinterpreting what you'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't understand the precise decisions behind having it done it that way. Perhaps if somebody else knows, they will chime in. (I'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>
> Many projects already have logic in their CMakeLists.txt files that goes<br>
> something like this:<br>
> if(CMAKE_SIZEOF_VOID_P EQUAL 8)<br>
> # do 64-bit stuff at *configure* time...<br>
> else()<br>
> # 32-bit stuff<br>
> endif()<br>
> If you make *configure* time decisions based on architecture, then it's not<br>
> easy to support multiple architectures without multiple configures.<br>
> (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>
> Since this is a prevalent scheme that is widely used by folks coming from<br>
> single-config, single-architecture (makefile based) build systems... it's<br>
> the way CMake has gotten to the point it's at now. I'm not saying this is<br>
> good or bad, just explaining that this is the way it is, and that there are<br>
> historical reasons why we got to this point.<br>
> So.... what you're attempting is probably possible, but it's definitely not<br>
> easy. And it will probably require some significant re-work of the existing<br>
> code.<br>
> Let us know if you have any other specific questions that we can answer for<br>
> 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>