On Tue, Mar 10, 2009 at 3:54 PM, Tristan Carel <span dir="ltr"><<a href="mailto:tristan.carel@gmail.com">tristan.carel@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On Tue, Mar 10, 2009 at 23:42, James Bigler <<a href="mailto:jamesbigler@gmail.com">jamesbigler@gmail.com</a>> wrote:<br>
> Is there a way to discover if a path is a relative path or not?<br>
><br>
> I need to make sure that all paths are absolute for a given application, and<br>
> I can be given either relative or absolute paths to files. If I'm given a<br>
> relative path I want to prepend ${CMAKE_CURRENT_SOURCE_DIR} to make it<br>
> absolute, but if it's already absolute, I don't want to add anything.<br>
<br>
</div></div>Hi James,<br>
<br>
by grep"ping" `absolute' is the CMake documentation, you find:<br>
<br>
if(IS_ABSOLUTE path)<br>
True if the given path is an absolute path.<br>
<br>
Cheers<br>
<font color="#888888">--<br>
Tristan Carel</font></blockquote><div><br>That's rather embarrassing that I missed that. I thought I search the docs for something like that. Oh, well. Thanks for the quick reply.<br><br>James <br></div></div><br>