summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPathCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindPathCommand.cxx')
-rw-r--r--Source/cmFindPathCommand.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx
index 05ac43c..486fb53 100644
--- a/Source/cmFindPathCommand.cxx
+++ b/Source/cmFindPathCommand.cxx
@@ -67,6 +67,18 @@ bool cmFindPathCommand::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(),
+ (this->IncludeFileInPath ?
+ cmCacheManager::FILEPATH :cmCacheManager::PATH)
+ );
+ }
return true;
}
std::string ff = this->Makefile->GetSafeDefinition("CMAKE_FIND_FRAMEWORK");