[CMake] access absolute path of parent directory
Vinay Raj Hampapur
vinayraj.hampapur at gmail.com
Tue Aug 9 16:24:37 EDT 2011
Sure.
Here is what I have(I've tried it with double quotes as well):
set(Bob /..)
set(Dave ${Bob}/Dave)
set(D_src ${Dave/Dave.cpp)
... and corresponding add executable command at which point the following
error is produced:
CMake Error at CMakeLists.txt:100 (add_executable):
Cannot find source file:
/../Dave/Dave.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
Let me know if you would need more information.
Thanks for your help,
Vinay
On Tue, Aug 9, 2011 at 12:30 PM, John Drescher <drescherjm at gmail.com> wrote:
> > I've been trying to access the parent directory by using
> > CMakeLists.txt. However, the "../" or ".." or "/../" notations don't
> access
> > said parent directory.
>
>
> Can you show a small example? I know this has worked for me.
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110809/ff0e3822/attachment.htm>
More information about the CMake
mailing list