summaryrefslogtreecommitdiff
path: root/Source/cmVariableRequiresCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-12-03 17:47:30 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2001-12-03 17:47:30 -0500
commit2c853716ceb49e6840eb3081055d009100833c29 (patch)
treea232bc0d0b504b212d70b0f4a116dde8687c11e2 /Source/cmVariableRequiresCommand.cxx
parent2bdcc9ae7e98c840c53d63d7b5fb5d6b66650225 (diff)
downloadcmake-2c853716ceb49e6840eb3081055d009100833c29.tar.gz
ENH: let people know the variable is advanced
Diffstat (limited to 'Source/cmVariableRequiresCommand.cxx')
-rw-r--r--Source/cmVariableRequiresCommand.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmVariableRequiresCommand.cxx b/Source/cmVariableRequiresCommand.cxx
index 4c12027cd9..bcae09c141 100644
--- a/Source/cmVariableRequiresCommand.cxx
+++ b/Source/cmVariableRequiresCommand.cxx
@@ -63,6 +63,7 @@ void cmVariableRequiresCommand::FinalPass()
std::string resultVarible = m_Arguments[1];
bool requirementsMet = true;
std::string notSet;
+ bool hasAdvanced = false;
for(unsigned int i = 2; i < m_Arguments.size(); ++i)
{
if(!m_Makefile->IsOn(m_Arguments[i].c_str()))
@@ -70,6 +71,10 @@ void cmVariableRequiresCommand::FinalPass()
requirementsMet = false;
notSet += m_Arguments[i];
notSet += "\n";
+ if(cmCacheManager::GetInstance()->IsAdvanced(m_Arguments[i].c_str()))
+ {
+ hasAdvanced = true;
+ }
}
}
const char* reqVar = m_Makefile->GetDefinition(resultVarible.c_str());
@@ -87,7 +92,11 @@ void cmVariableRequiresCommand::FinalPass()
message += testVarible + " Requires that the following unset varibles are set:\n";
message += notSet;
message += "\nPlease set them, or set ";
- message += testVarible + " to false, and re-configure.";
+ message += testVarible + " to false, and re-configure.\n";
+ if(hasAdvanced)
+ {
+ message += "One or more of the required variables is advanced. To set the variable, you must turn on advanced mode in cmake.";
+ }
cmSystemTools::Error(message.c_str());
}
}