From 54769660e107a6d2cf60cc1ca995ce04372e9eb6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 12 Sep 2025 17:44:34 -0400 Subject: [PATCH] cmake --build: Simplify MSBuild Configuration and Platform arguments --- Source/cmGlobalVisualStudio10Generator.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 1fefd08845..3c36244897 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -1198,14 +1198,9 @@ cmGlobalVisualStudio10Generator::GenerateBuildCommand( } } - std::string plainConfig = config; - if (config.empty()) { - plainConfig = "Debug"; - } - - std::string platform = GetPlatformName(); - makeCommand.Add(cmStrCat("/p:Configuration=", plainConfig)); - makeCommand.Add(cmStrCat("/p:Platform=", platform)); + makeCommand.Add( + cmStrCat("/p:Configuration=", config.empty() ? "Debug" : config)); + makeCommand.Add(cmStrCat("/p:Platform=", this->GetPlatformName())); makeCommand.Add( cmStrCat("/p:VisualStudioVersion=", this->GetIDEVersion()));