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    &quot;${CMAKE_C_FLAGS} -m32&quot;)<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">&lt;<a href="mailto:richard@whitequeen.com">richard@whitequeen.com</a>&gt;</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&#39;m at the stage where Project B needs access to Projects A&#39;s message<br>
definitions - so I thought the easiest way is to &quot;embed it&quot; 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&#39;m guessing<br>
this could be as simple as SET&#39;ing a variable :-)<br>
<br>
<br>
However, while I only really need one part of Project A inside Project B,<br>
for the team&#39;s convenience I&#39;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&#39;t seem to be an easy way to say &quot;here are the FLAGS (-m32) for<br>
this directory and below&quot;. 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>