On Mon, Jun 8, 2009 at 9:59 AM, Tyler Roscoe <span dir="ltr"><<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Mon, Jun 08, 2009 at 09:55:13AM -0600, James Bigler wrote:<br>
> I shudder to think of having to multiply all of my find_library calls with<br>
> architecture dependent versions:<br>
<br>
</div>It sounds like you already do this?</blockquote><div><br>Well, it's done a per configuration basis. I only have to find one library, either 32 or 64 bit. If I have to find both, I now need to call find_library twice for each architecture. This also means, I need to keep track of two library variables (one for 32 and one for 64) since the same variable can't be used twice.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div class="im">> There are many places in my code where I have switches based on 32 or 64 bit<br>
> architectures.<br>
<br>
</div>Anyway, perhaps a CombinedWin32AndX64InOneGenerator should be Yet<br>
Another Generator so that developers already happy with the separate<br>
generators for 32 vs 64 can simply continue to do what they're already<br>
doing?<br>
<br>
I realize that the purpose of this exercise is to prevent the<br>
proliferation of generators, but maybe "one more" for this particular<br>
case is worthwhile?</blockquote><div><br>I'm still not convinced that a new generator would solve all of your problems. In fact, I think this would make it worse, because now I have to have a switch to accommodate the new generator.<br>
<br><span style="font-family: courier new,monospace;">if(CMAKE_GENERATOR MATCHES "CombinedWin32AndX64InOneGenerator")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
find_library(project_library32 ...)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
find_library(project_library64 ...)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
set(project_library ARCH32 ${project_library32} ARCH64 ${project_library64})</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
else()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
find_library(project_library ...)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
endif()</span><br style="font-family: courier new,monospace;">
<br></div></div>
<br>James<br>