Re: [CMake] Toggle Absolute paths in Eclipse Generator

2017-03-28 Thread Eric Noulard
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.porto...@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:
>
> -E chdir "/home/portolan/my_project/Opt
> ional_Libs/eclipse_build/Server" "/usr/bin/cmake" -P
> "CMakeFiles/ATE_Loopback_Server.dir/cmake_clean.cmake"
>
>
> 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
-- 

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

[CMake] Toggle Absolute paths in Eclipse Generator

2017-03-28 Thread Michele Portolan

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:


-E chdir 
"/home/portolan/my_project/Optional_Libs/eclipse_build/Server" 
"/usr/bin/cmake" -P 
"CMakeFiles/ATE_Loopback_Server.dir/cmake_clean.cmake"



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/opensource/opensource.html

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