From 2c853716ceb49e6840eb3081055d009100833c29 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 3 Dec 2001 17:47:30 -0500 Subject: [PATCH] ENH: let people know the variable is advanced --- Source/cmVariableRequiresCommand.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/cmVariableRequiresCommand.cxx b/Source/cmVariableRequiresCommand.cxx index 4c12027cd..bcae09c14 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()); } }