On 11/03/14 14:51, Brad King wrote:
> Also the hunks:
> 
> +        if(UNIX)
> +          string(REPLACE "\\:" ";" _path "${_path}")
> +        endif()
> 
> should not be necessary because TO_CMAKE_PATH already does that.
> It looks like TO_NATIVE_PATH does not do the reveres though so that
> explicit replacement is still needed.


Done. I also added an extra commit to remove empty values from the list.
I'll add the unit tests as soon as possible.

It is a quite common use case to get and set "path" environment
variables and taking care of TO_CMAKE_PATH/TO_NATIVE_PATH windows/linux
every time is a bit annoying... It would be really nice to have an easy
way to do this replacement in both ways that automatically takes care of
unix and windows
Perhaps having a syntax like this:

  get: $ENV:PATH{VAR}
  set: ENV:PATH{VAR}

That automatically convert to local/native path and replaces the ";" and
":" as necessary on the system.

Do you think this is doable?


Cheers,
 Daniele
-- 

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/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to