From 494d4d2e55cc578ec711a74643f617982c847f3d Mon Sep 17 00:00:00 2001 From: Joseph Brill <48932340+jcbrill@users.noreply.github.com> Date: Fri, 13 Oct 2023 07:45:39 -0400 Subject: Rework msvc cl not found warning message order and construction. --- SCons/Tool/MSCommon/vc.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/SCons/Tool/MSCommon/vc.py b/SCons/Tool/MSCommon/vc.py index 5926960..8780604 100644 --- a/SCons/Tool/MSCommon/vc.py +++ b/SCons/Tool/MSCommon/vc.py @@ -1531,16 +1531,15 @@ def msvc_setup_env(env): # final check to issue a warning if the requested compiler is not present if not found_cl_path: + warn_msg = "Could not find requested MSVC compiler 'cl'." if CONFIG_CACHE: - propose = f"SCONS_CACHE_MSVC_CONFIG caching enabled, remove cache file {CONFIG_CACHE} if out of date." + warn_msg += f" SCONS_CACHE_MSVC_CONFIG caching enabled, remove cache file {CONFIG_CACHE} if out of date." else: - propose = "It may need to be installed separately with Visual Studio." - warn_msg = "Could not find requested MSVC compiler 'cl'." + warn_msg += " It may need to be installed separately with Visual Studio." if found_cl_envpath: warn_msg += " A 'cl' was found on the scons ENV path which may be erroneous." - warn_msg += " %s" - debug(warn_msg, propose) - SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, warn_msg % propose) + debug(warn_msg) + SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, warn_msg) def msvc_exists(env=None, version=None): vcs = get_installed_vcs(env) -- cgit v0.12