On Tue, Mar 10, 2009 at 23:42, James Bigler <jamesbig...@gmail.com> wrote:
> Is there a way to discover if a path is a relative path or not?
>
> I need to make sure that all paths are absolute for a given application, and
> I can be given either relative or absolute paths to files.  If I'm given a
> relative path I want to prepend ${CMAKE_CURRENT_SOURCE_DIR} to make it
> absolute, but if it's already absolute, I don't want to add anything.

Hi James,

by grep"ping" `absolute' is the CMake documentation, you find:

if(IS_ABSOLUTE path)
True if the given path is an absolute path.

Cheers
-- 
Tristan Carel
Normal is getting dressed in clothes that you buy for work and driving
through traffic in a car that you are still paying for - in order to
get to the job you need to pay for the clothes and the car, and the
house you leave vacant all day so you can afford to live in it.
http://www.tristancarel.com
_______________________________________________
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to