CMake/Help/variable/PROJECT_SOURCE_DIR.rst
Nicolas Bock bd6e437e3e Help: Clarify the use of PROJECT_SOURCE_DIR
The value of the PROJECT_SOURCE_DIR variable is not always the source
directory of the "most recent project command". If the project was
included via add_subdirectory, variable scoping will prevent this
value to change in the parent scope.

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
2020-04-29 23:17:41 +10:00

9 lines
351 B
ReStructuredText

PROJECT_SOURCE_DIR
------------------
This is the source directory of the last call to the
:command:`project` command made in the current directory scope or one
of its parents. Note, it is not affected by calls to
:command:`project` made within a child directory scope (i.e. from
within a call to :command:`add_subdirectory` from the current scope).