A simple set of CMAKE_C_FLAGS or CMAKE_CXX_FLAGS will set the value for the current directory and below:<br><br> set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")<br><br>Any add_directory() commands after the above line will inherit the -m32 flag.<br>
<br>--<br>Glenn<br><br><div class="gmail_quote">On 5 June 2011 20:36, Richard Offer <span dir="ltr"><<a href="mailto:richard@whitequeen.com">richard@whitequeen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
I have two distinct projects - A and B - each has its own subversion<br>
repository etc - they are quite independent.<br>
<br>
Project A is nw and needs to be built 32bit and itself comprises both<br>
in-house and third party code. The third party code is built using<br>
ExternalProject_Add()<br>
<br>
<br>
Project B is built 64bit - this is our current project so everyone is<br>
already building that.<br>
<br>
Both use Cmake :-)<br>
<br>
<br>
I'm at the stage where Project B needs access to Projects A's message<br>
definitions - so I thought the easiest way is to "embed it" via subversion.<br>
<br>
<br>
How can Project A recognize that its being built as a component of Project<br>
B ? ( I can then only build certain targets in Project A). Project A still<br>
needs to be able to do its normal build outside of Project B. I'm guessing<br>
this could be as simple as SET'ing a variable :-)<br>
<br>
<br>
However, while I only really need one part of Project A inside Project B,<br>
for the team's convenience I'd really like for them to be able to build<br>
the 32bit Project A components at the same time they are building all of<br>
Project B. (saves having to have multiple virtual environments running for<br>
every task)<br>
<br>
<br>
There doesn't seem to be an easy way to say "here are the FLAGS (-m32) for<br>
this directory and below". Or have I missed something?<br>
<br>
And how do I handle building the same EXTERNAL_PROJECT() multiple times<br>
with different flags - it complains that the source directory is already<br>
present. And then correctly reference the 32/64 versions of the libraries<br>
when adding LINK targets ?<br>
<br>
<br>
Thanks<br>
<br>
<br>
Richard.<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>
</blockquote></div><br>