Hi Kevyn-Alexandre, <br><br>Indeed, you can get or set environment variable from CMake.<br><br>For example:<br>  set(ENV{PATH} &quot;/path/to/foo:$ENV{PATH}&quot;)<br><br>Hth<br>Jc<br><br><div class="gmail_quote">On Fri, Jul 15, 2011 at 6:02 PM, Kevyn-Alexandre Paré <span dir="ltr">&lt;<a href="mailto:kapare@rogue-research.com">kapare@rogue-research.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">So I could simply get SVN_ROOT_PATH OE_PATH from<br>
<br>
$ENV{SVN_ROOT_PATH}<br>
$ENV{OE_PATH}<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On 2011-07-15, at 5:27 PM, Kevyn-Alexandre Paré wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; How do I make cmake to use environment variable?<br>
&gt;<br>
&gt; My context is that I want to have environment variable that represent my svn ROOT PATH (developer ENV.) and my open embedded path (in case of cross compiling). What&#39;s the best way to have something reusable for each developer?<br>


&gt;<br>
&gt;<br>
&gt; EX:<br>
&gt;<br>
&gt; SOMEWHERE on my HD:<br>
&gt;<br>
&gt; SVN_ROOT_PATH<br>
&gt;       Project<br>
&gt;               trunk<br>
&gt;                       Config<br>
&gt;                               Config-Generic-cache.txt   #ARCH, COMPILER, FLAGS, build type<br>
&gt;                               Config-Project-specific-cache.txt # COMPILATION PROJECT SPECIFIC<br>
&gt;                       CMakeLists.txt<br>
&gt;                       build<br>
&gt;<br>
&gt; SOMEWHERE else on my HD:<br>
&gt; OE_PATH<br>
&gt;<br>
&gt; So for now I do this and hardcode the SVN_ROOT_PATH in Config-Generic-cache.txt:<br>
&gt;<br>
&gt; cd SVN_ROOT_PATH/Project/trunk/build<br>
&gt; cmake -DCMAKE_SYSTEM_PROCESSOR:STRING=x86_64 -DCMAKE_BUILD_TYPE:STRING=debug -C ../Config/Config-Generic-cache.txt  ../<br>
&gt;<br>
&gt;<br>
&gt; Any suggestion to add the SVN_ROOT_PATH, best solution / best practice?<br>
&gt;<br>
&gt; Best Regards<br>
&gt;<br>
&gt; Kevyn-Alexandre<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>