From 895f8c42c0608703dff076eb195092a96a7c9f45 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 12 Sep 2002 09:56:48 -0400 Subject: [PATCH] Fix mark as advanced. Now it should work properly --- Source/cmMarkAsAdvancedCommand.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index 17f3002fb..1e71b2ddd 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -48,6 +48,7 @@ bool cmMarkAsAdvancedCommand::InitialPass(std::vector const& argsIn { m_Makefile->AddCacheDefinition(variable.c_str(), 0, 0, cmCacheManager::UNINITIALIZED); + overwrite = true; } it.Find(variable.c_str()); if ( it.IsAtEnd() ) @@ -55,7 +56,10 @@ bool cmMarkAsAdvancedCommand::InitialPass(std::vector const& argsIn cmSystemTools::Error("This should never happen..."); return false; } - it.SetProperty("ADVANCED", value); + if ( overwrite ) + { + it.SetProperty("ADVANCED", value); + } } return true; }