[CMake] [Cmake] Detect caller project for a sub-project

Filippo Trimoldi tetractius at gmail.com
Thu Jun 10 06:18:54 EDT 2010


If I have a CMake project organized in more than two level, i.e.

CMakeLists.txt:
PROJECT(A)
add_subdirectories(./projectB)

./projectB/CMakeLists.txt:
PROJECT(B)
add_subdirectories(${PROJECT_SOURCE_DIR}/projectC)

./projectB/projectC/CMakeLists.txt:
PROJECT(C)

is there some kind of way for a project to detect the name of the project
from which it was added? In this example, can C know that was added by B?
(and B was added by A?)

Thanks!!

Fil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100610/353c64ee/attachment-0001.htm>


More information about the CMake mailing list