summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmMakefile.cxx2
-rw-r--r--Source/cmProjectCommand.cxx9
3 files changed, 10 insertions, 3 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 5649c0b..e2b022f 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 12)
-set(CMake_VERSION_PATCH 20180725)
+set(CMake_VERSION_PATCH 20180726)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index a9b0b78..c868159 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1526,6 +1526,8 @@ void cmMakefile::Configure()
project.Name.Lower = "project";
project.Arguments.emplace_back("Project", cmListFileArgument::Unquoted,
0);
+ project.Arguments.emplace_back("__CMAKE_INJECTED_PROJECT_COMMAND__",
+ cmListFileArgument::Unquoted, 0);
listFile.Functions.insert(listFile.Functions.begin(), project);
}
}
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index a25bd6b..ee44007 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -69,6 +69,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
bool haveLanguages = false;
bool haveDescription = false;
bool haveHomepage = false;
+ bool injectedProjectCommand = false;
std::string version;
std::string description;
std::string homepage;
@@ -160,6 +161,8 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
"by a value that expanded to nothing.");
resetReporter();
};
+ } else if (i == 1 && args[i] == "__CMAKE_INJECTED_PROJECT_COMMAND__") {
+ injectedProjectCommand = true;
} else if (doing == DoingVersion) {
doing = DoingLanguages;
version = args[i];
@@ -280,8 +283,10 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
const char* v = this->Makefile->GetDefinition(i);
if (v && *v) {
if (cmp0048 == cmPolicies::WARN) {
- vw += "\n ";
- vw += i;
+ if (!injectedProjectCommand) {
+ vw += "\n ";
+ vw += i;
+ }
} else {
this->Makefile->AddDefinition(i, "");
}