[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Toggle Absolute paths in Eclipse Generator
From:       Eric Noulard <eric.noulard () gmail ! com>
Date:       2017-03-28 12:18:40
Message-ID: CAPASGLqFzNc=mxF==K0=2qEUOb5wvWL1w-Q=Bj4A8qr=bvKJGA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Michele,

If you look into CMake ML history you'll find many discussions concerning
the ABSOLUTE vs RELATIVE path for generated build systems.

CMake had once an option for trying that, the support has been removed:
https://cmake.org/cmake/help/v3.7/variable/CMAKE_USE_RELATIVE_PATHS.html

So basically you cannot ask generate relative paths.

See:
https://cmake.org/Wiki/CMake_FAQ#Why_does_CMake_use_full_paths.2C_or_can_I_copy_my_build_tree.3F


2017-03-28 12:17 GMT+02:00 Michele Portolan <
michele.portolan@grenoble-inp.fr>:

> Hello,
>
> I am trying to use the Eclipse Generator to create a project to be
> exported to Eclipse. Everything works fine, but when I look at the
> generated .cproject and .project I see that all paths are absolute, like
> for instance:
>
> <buildArguments>-E chdir "/home/portolan/my_project/Opt
> ional_Libs/eclipse_build/Server" "/usr/bin/cmake" -P
> "CMakeFiles/ATE_Loopback_Server.dir/cmake_clean.cmake"</buildArguments>
>
>
> This is not really good because I would like to copy my project to another
> machine where I do not have /home/portolan/.
>
> So I have two questions: Can I ask cmake to
>
>  - generate relative paths instead of absolute?
>
>  - copy the sources locally to the Eclipse project, rather than use the
> external ones?
>
>
> Thanks,
>
>
> Michele
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Eric

[Attachment #5 (text/html)]

<div dir="ltr">Hi Michele,<div><br></div><div>If you look into CMake ML history \
you&#39;ll find many discussions concerning the ABSOLUTE vs RELATIVE path for \
generated build systems.</div><div><br></div><div>CMake had once an option for trying \
that, the support has been removed:</div><div><a \
href="https://cmake.org/cmake/help/v3.7/variable/CMAKE_USE_RELATIVE_PATHS.html">https: \
//cmake.org/cmake/help/v3.7/variable/CMAKE_USE_RELATIVE_PATHS.html</a><br></div><div><br></div><div>So \
basically you cannot ask  <span style="font-size:12.8px">generate relative \
paths.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span \
style="font-size:12.8px">See:</span></div><div><span style="font-size:12.8px"><a \
href="https://cmake.org/Wiki/CMake_FAQ#Why_does_CMake_use_full_paths.2C_or_can_I_copy_ \
my_build_tree.3F">https://cmake.org/Wiki/CMake_FAQ#Why_does_CMake_use_full_paths.2C_or_can_I_copy_my_build_tree.3F</a></span><br></div><div><br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">2017-03-28 12:17 GMT+02:00 Michele \
Portolan <span dir="ltr">&lt;<a href="mailto:michele.portolan@grenoble-inp.fr" \
target="_blank">michele.portolan@grenoble-inp.fr</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hello,<br> <br>
I am trying to use the Eclipse Generator to create a project to be exported to \
Eclipse. Everything works fine, but when I look at the generated .cproject and \
.project I see that all paths are absolute, like for instance:<br> <br>
&lt;buildArguments&gt;-E chdir \
&quot;/home/portolan/my_project/Opt<wbr>ional_Libs/eclipse_build/Serve<wbr>r&quot; \
&quot;/usr/bin/cmake&quot; -P \
&quot;CMakeFiles/ATE_Loopback_Serve<wbr>r.dir/cmake_clean.cmake&quot;&lt;/<wbr>buildArguments&gt;<br>
 <br>
<br>
This is not really good because I would like to copy my project to another machine \
where I do not have /home/portolan/.<br> <br>
So I have two questions: Can I ask cmake to<br>
<br>
  - generate relative paths instead of absolute?<br>
<br>
  - copy the sources locally to the Eclipse project, rather than use the external \
ones?<br> <br>
<br>
Thanks,<br>
<br>
<br>
Michele<br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" \
target="_blank">www.kitware.com</a><br> <br>
Please keep messages on-topic and check the CMake FAQ at: <a \
href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" \
target="_blank">http://www.cmake.org/Wiki/CMak<wbr>e_FAQ</a><br> <br>
Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:<br> <br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" \
target="_blank">http://cmake.org/cmake/help/su<wbr>pport.html</a><br> CMake \
Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" \
target="_blank">http://cmake.org/cmake/help/co<wbr>nsulting.html</a><br> CMake \
Training Courses: <a href="http://cmake.org/cmake/help/training.html" \
rel="noreferrer" target="_blank">http://cmake.org/cmake/help/tr<wbr>aining.html</a><br>
 <br>
Visit other Kitware open-source projects at <a \
href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" \
target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br> <br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" \
target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/cmake</a><br> \
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div \
dir="ltr"><div>Eric<br></div></div></div></div></div> </div>



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic