On Tue, Jul 9, 2019 at 9:38 AM hex <hex...@gmail.com> wrote: > thank you J Decker for your reply. > > > Your suggestion does work but I want to preserve standalone use of the > project, meaning that I want a reference to CMake source root directory. > > Assuming there is only 1 hierarchy I could add an option: > > > if ( SUPERBUILD ) > > *message("${CMAKE_SOURCE_DIR}/.. = /home/user/super/ext1/..")* > > *else ()* > > *message("${CMAKE_SOURCE_DIR} = /home/user/super/ext1")* > > endif () > > > I think the better solution now is to make it relative to build directory > and force out of source builds. > > > +1 I think; You said it was generated? It should be in the build directory anyway :) And out of source always. (makes it easier to source version control)
> On 09/07/2019 14:26, J Decker wrote: > > > > *message("${CMAKE_SOURCE_DIR}/.. = /home/user/super/ext1/..")* which == > /home/user/super > >> >> >> -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake