Re: [CMake] Using CMake include does not seem to work intuatively

2017-12-13 Thread Michael Jackson
are [e] mike.jack...@bluequartz.net [w] www.bluequartz.net From: CMake <cmake-boun...@cmake.org> on behalf of Petr Kmoch <petr.km...@gmail.com> Date: Wednesday, December 13, 2017 at 3:03 AM To: Saad Khattak <saadrus...@gmail.com> Cc: CMake Mail List <cmake@cmake.org>

Re: [CMake] Using CMake include does not seem to work intuatively

2017-12-13 Thread Petr Kmoch
Hi Saad. I can't comment on whether the behaviour is correct or expectable, but to get it working the way you want, you can specify the path fully: include(${CMAKE_CURRENT_LIST_DIR}/Bar.cmake) Petr On 13 December 2017 at 01:34, Saad Khattak wrote: > Hi, > > Let's say I

[CMake] Using CMake include does not seem to work intuatively

2017-12-12 Thread Saad Khattak
Hi, Let's say I have the following directory structure: ~/Repos/MyRepo/CMakeLists.txt ~/CMakeFiles/Foo.cmake ~/CMakeFiles/Bar.cmake In the CMakeLists.txt I have the following command: include(~/CMakeFiles/Foo.cmake) And in Foo.cmake I have the following command: include(Bar.cmake) Turns out