<br>So I have various CMakeLists.txt files in my directory structure.  Some with the PROJECT( name ) specified at the top and some without.  I am using add_sub directory to add each directory.  <br><br>/CMakeLists.txt<br>/source/cpp/app/CMakeLists.txt<br>

/source/cpp/app/someapp/CMakeLists.txt<br clear="all">/source/cpp/lib/CmakeLists.txt<br>source/cpp/lib/somelib<br><br>For the subdirectory structure above build settings for someapp will inherit from app/CMakeLists.txt and the top level CMakeLists.txt file.  However if the build directories and include paths are set for libraries in /source/cpp/lib/CmakeLists.txt how would apps see these.  <br>

<br>Is there a way for one project to inherit project settings from another project which is not in the path from the originating subproject CMakeLists.txt (app/CMakeLists.txt) up to the root CMakeLists.txt?  <br><br>For example is there a way for apps to inherit project settings in libs (such as include paths) without having to use CACHE STRING &quot;&quot; FORCE and having to move these vars up the path to the root CMakeLists.txt file.<br>

<br>Is there also a way to disable recursive sub directory project inheritance in CMake?<br><br>Is there another name I can give to my CMakeLists.txt files that CMake will parse in add_subdirectory?  I have multiple CMakeLists.txt files open in eclipse and can never keep which one is which straight (they all have the same name).  <br>

<br>I also noticed that if I have a CMakeLists.txt in between the top/root level CMakeLists.txt without the PROJECT( name ) in the file that include paths added at the intermediary CMakeLists.txt using INCLUDE_DIRECTORIES( wherever) are still inherited.<br>
<br>-- <br>Brian J. Davis<br><br>