summaryrefslogtreecommitdiffstats
path: root/Source/cmFindProgramCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindProgramCommand.cxx')
-rw-r--r--Source/cmFindProgramCommand.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx
index 475d3be..47bae5d 100644
--- a/Source/cmFindProgramCommand.cxx
+++ b/Source/cmFindProgramCommand.cxx
@@ -51,6 +51,15 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
}
if(this->AlreadyInCache)
{
+ // If the user specifies the entry on the command line without a
+ // type we should add the type and docstring but keep the original
+ // value.
+ if(this->AlreadyInCacheWithoutMetaInfo)
+ {
+ this->Makefile->AddCacheDefinition(this->VariableName.c_str(), "",
+ this->VariableDocumentation.c_str(),
+ cmCacheManager::FILEPATH);
+ }
return true;
}