On Tue, Mar 10, 2009 at 3:54 PM, Tristan Carel <tristan.ca...@gmail.com>wrote:
> 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 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. James
_______________________________________________ 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