mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
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>
This commit is contained in:

committed by
Craig Scott

parent
265fb71c91
commit
bd6e437e3e
@@ -1,6 +1,8 @@
|
||||
PROJECT_SOURCE_DIR
|
||||
------------------
|
||||
|
||||
Top level source directory for the current project.
|
||||
|
||||
This is the source directory of the most recent :command:`project` command.
|
||||
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).
|
||||
|
Reference in New Issue
Block a user