diff options
author | Joseph Brill <48932340+jcbrill@users.noreply.github.com> | 2023-10-13 14:45:39 +0300 |
---|---|---|
committer | Joseph Brill <48932340+jcbrill@users.noreply.github.com> | 2023-10-13 14:45:39 +0300 |
commit | 494d4d2e55cc578ec711a74643f617982c847f3d (patch) | |
tree | 32e56e984189d0378b73f2531678da2bfaf011fb | |
parent | bf5dc45d18542baed5597c1363739104cd79ea62 (diff) |
Rework msvc cl not found warning message order and construction.
-rw-r--r-- | SCons/Tool/MSCommon/vc.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/SCons/Tool/MSCommon/vc.py b/SCons/Tool/MSCommon/vc.py index 592696056..8780604a3 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) |