diff options
author | Deniz Bahadir <dbahadir@benocs.com> | 2019-10-18 10:51:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-10-18 18:44:24 (GMT) |
commit | f7acc1266c64be58793cf926b41f0d58b5a55e2a (patch) | |
tree | b3931ee79ad4debbf5cd16112edb6accfa8ab162 /Source/cmProjectCommand.cxx | |
parent | 154aa87ca6bd906b6422ad81f51161995c89cc14 (diff) | |
download | CMake-f7acc1266c64be58793cf926b41f0d58b5a55e2a.zip CMake-f7acc1266c64be58793cf926b41f0d58b5a55e2a.tar.gz CMake-f7acc1266c64be58793cf926b41f0d58b5a55e2a.tar.bz2 |
project: Add variable CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE
Follow up commit 0761186949 (project: Add variable
CMAKE_PROJECT_INCLUDE_BEFORE, 2019-03-28, v3.15.0-rc1~294^2) with a
project-specific variant. This variable will be used similar to the
already existing `CMAKE_PROJECT_INCLUDE_BEFORE` and
`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE` variables.
Fixes: #19854
Diffstat (limited to 'Source/cmProjectCommand.cxx')
-rw-r--r-- | Source/cmProjectCommand.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index eb59b4f..1ce6c70 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -39,6 +39,11 @@ bool cmProjectCommand(std::vector<std::string> const& args, std::string const& projectName = args[0]; + if (!IncludeByVariable(status, + "CMAKE_PROJECT_" + projectName + "_INCLUDE_BEFORE")) { + return false; + } + mf.SetProjectName(projectName); mf.AddCacheDefinition(projectName + "_BINARY_DIR", |