<div dir="ltr"><div>Hi,</div><div><br></div><div>can you elaborate on how the commands you've shown "don't work?" What do they do and how does it differ from what you need?</div><div><br></div><div>Petr<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 28 Aug 2018 at 08:33, Ke Gao <<a href="mailto:ke.gao.ut@gmail.com">ke.gao.ut@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>I tried different way of using GET_FILENAME_COMPONENT to find the parent path of PROJECT_SOURCE_DIR, or another path relative to the parent of PROJECT_SOURCE_DIR, never succeeded. <br><br></div>Can anybody help, thank you very much.<br><div><br>None of the following works. I'm using Cmake 2.8.12<br>GET_FILENAME_COMPONENT(SRC_DIR ${PROJECT_SOURCE_DIR}/../source/ PATH)<br>GET_FILENAME_COMPONENT(SRC_DIR ${PROJECT_SOURCE_DIR}/../source/ ABSOLUTE)<div><div>GET_FILENAME_COMPONENT(ANA_ROOT_DIR ${PROJECT_SOURCE_DIR} ABSOLUTE)<br>-- <br><div dir="ltr" class="m_7919678793700873155gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font size="1" face="arial,helvetica,sans-serif" color="#000000">..............................................................................................................................................</font></div><font face="tahoma,sans-serif" color="#3366ff"><div><font style="background-color:rgb(255,255,255)" face="arial black,sans-serif" color="#000000">Ke Gao</font></div></font></div></div></div></div></div></div></div></div></div></div>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>