From 53daa9e33b7ffbb7c8fe5ab8cc41caee7ed673c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Rivera?= Date: Thu, 13 Jun 2024 22:31:23 -0500 Subject: [PATCH] Fix the case of asking to initialize any msvc toolset when they are already initialized causing errors. When having "using msvc : x.y ;" in one config and doing "using msvc ;" in another would fail as the later would try and re-init x.y and error. With this change the empty msvc init will be a no-op as we already having toolsets to use. --- src/tools/msvc.jam | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index 5f304c807..c210b93b3 100644 --- a/src/tools/msvc.jam +++ b/src/tools/msvc.jam @@ -1272,6 +1272,13 @@ local rule configure-really ( version ? : options * ) { local command = [ feature.get-values : $(options) ] ; + # We don't try and register any more versions than what we already know + # about when ask to discover any available versions. + if ! $(version) && ! $(command) && [ $(.versions).used ] + { + return ; + } + if ! $(version) && ! $(command) { # We were given neither a command, nor a version.