Given a big cmake
project, let B
be a CMakeLists.txt
, located at some directory within it. Is there any way to print (message(...)
) from within B
which parent CMakeLists.txt
file did the add_subdirectory(B)
or equivalent?
Note: Let's suppose that no cmake
files do literally add_subdirectory(B)
, but rather add_subdirectory(${X})
, being X
the path to subdirectory B
, determined through the cmake
tree somehow. Otherwise, this could be determined just with grep
.