Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8fca589
Suppress warning for missing MSVC compiler for initial call to msvc_s…
jcbrill Apr 11, 2022
f338fee
Raise MSVCVersionNotFound exception instead of returning an empty/und…
jcbrill Apr 12, 2022
60a4974
Merge branch 'master' into jbrill-msvc-warnfix
jcbrill Apr 15, 2022
b19e130
Rework exception message construction when a specified msvc version i…
jcbrill Apr 24, 2022
6f68a4f
Simplify msvc version not found exception messages by removing imposs…
jcbrill Apr 24, 2022
35d0a46
Replace msvc_exists in tools exists functions for msvc tools with msv…
jcbrill Apr 26, 2022
51aadab
Return previous policy when setting msvc notfound policy
jcbrill Apr 29, 2022
3605245
Merge branch 'master' into jbrill-msvc-warnfix
jcbrill May 1, 2022
7572fe5
Fix set/get notfound policy to return policy symbol instead of intern…
jcbrill May 2, 2022
6d7bf1e
Rename internal notfound policy dictionary.
jcbrill May 2, 2022
b5608f4
Merge branch 'master' into jbrill-msvc-warnfix
jcbrill May 3, 2022
50c9209
Merge branch 'master' into jbrill-msvc-warnfix
jcbrill May 4, 2022
d511091
Merge branch 'master' into jbrill-msvc-warnfix
jcbrill May 15, 2022
cc81a44
Hard-code tool name instead of deriving from file name
jcbrill May 15, 2022
a90c142
Update test script header with template/test.py header
jcbrill May 15, 2022
85044cc
Merge branch 'master' into jbrill-msvc-warnfix
jcbrill May 15, 2022
98f6c28
Merge branch 'master' into jbrill-msvc-warnfix
bdbaddog May 15, 2022
69bc00c
Merge branch 'master' into jbrill-msvc-warnfix
jcbrill May 16, 2022
a5d6098
Merge branch 'jbrill-msvc-warnfix' of https://github.com/jcbrill/scon…
jcbrill May 16, 2022
053f220
Fix tool name in test fixture
jcbrill May 16, 2022
85159b7
Remove unnecessary import
jcbrill May 16, 2022
2efe7d1
[ci skip] fix sider complaint. Reformat. Update file header to curren…
bdbaddog May 18, 2022
f2749b2
Merge branch 'jbrill-msvc-warnfix' of https://github.com/jcbrill/scon…
jcbrill May 19, 2022
0e51fe4
Change notfound policy parallel variables to namedtuple.
jcbrill May 19, 2022
479b123
Treat environment notfound policy set to None the same as if undefine…
jcbrill May 19, 2022
6848757
Update CHANGES.txt and RELEASE.txt. [ci skip]
jcbrill May 21, 2022
f6d4388
Merge branch 'master' into jbrill-msvc-warnfix
jcbrill Jun 1, 2022
eed3b58
Added test for invalid env['MSVC_NOTFOUND_POLICY'] value
bdbaddog Jun 6, 2022
de86183
Add Blurb for MSVC_NOTFOUND_POLICY
bdbaddog Jun 6, 2022
2946295
Update MSVC_NOTFOUND_POLICY documentation
jcbrill Jun 6, 2022
69d6b9a
Update MSVC_NOTFOUND_POLICY documentation
jcbrill Jun 6, 2022
e7c4d5b
Update MSVC_NOTFOUND_POLICY documentation
jcbrill Jun 6, 2022
1d3e0e3
Update MSVC_NOTFOUND_POLICY documentation
jcbrill Jun 6, 2022
e30a6ef
Update MSVC_NOTFOUND_POLICY documentation
jcbrill Jun 8, 2022
be45d8d
Add preliminary docstrings for set_msvc_notfound_policy and get_msvc_…
jcbrill Jun 8, 2022
609b79f
Update MSVC_NOTFOUND_POLICY documentation
jcbrill Jun 8, 2022
45f4555
Refine conditions for intent to use msvc tools
jcbrill Jun 10, 2022
ce31a25
Merge branch 'master' into jbrill-msvc-warnfix
jcbrill Jun 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,25 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
require delayed expansion to be enabled which is currently not supported and is
typically not enabled by default on the host system. The batch files may also require
environment variables that are not included by default in the msvc environment.
- Suppress issuing a warning when there are no installed Visual Studio instances for the default
tools configuration (issue #2813). When msvc is the default compiler because there are no
compilers installed, a build may fail due to the cl.exe command not being recognized. At
present, there is no easy way to detect during msvc initialization if the default environment
will be used later to build a program and/or library. There is no error/warning issued for the
default tools as there are legitimate SCons uses that do not require a c compiler.
- Added a global policy setting and an environment policy variable for specifying the action to
be taken when an msvc request cannot be satisfied. The available options are "error",
"exception", "warning", "warn", "ignore", and "suppress". The global policy variable may be
set and retrieved via the functions set_msvc_notfound_policy and get_msvc_notfound_policy,
respectively. These two methods may be imported from SCons.Tool.MSCommon. The environment
policy variable introduced is MSVC_NOTFOUND_POLICY. When defined, the environment policy
variable overrides the global policy setting for a given environment. When the active policy
is "error" or "exception", an MSVCVersionNotFound exception is raised. When the active policy
is "warning" or "warn", a VisualCMissingWarning warning is issued and the constructed
environment is likely incomplete. When the active policy is "ignore" or "suppress", no action
is taken and the constructed environment is likely incomplete. As implemented, the default
global policy is "warning". The ability to set the global policy via an SCons command-line
option may be added in a future enhancement.

From William Deegan:
- Fix check for unsupported Python version. It was broken. Also now the error message
Expand Down
19 changes: 19 additions & 0 deletions RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ NEW FUNCTIONALITY
performance impact if not used carefully.
- Added MSVC_USE_SETTINGS variable to pass a dictionary to configure the msvc compiler
system environment as an alternative to bypassing Visual Studio autodetection entirely.
- Added a global policy setting and an environment policy variable for specifying the action to
be taken when an msvc request cannot be satisfied. The available options are "error",
"exception", "warning", "warn", "ignore", and "suppress". The global policy variable may be
set and retrieved via the functions set_msvc_notfound_policy and get_msvc_notfound_policy,
respectively. These two methods may be imported from SCons.Tool.MSCommon. The environment
policy variable introduced is MSVC_NOTFOUND_POLICY. When defined, the environment policy
variable overrides the global policy setting for a given environment. When the active policy
is "error" or "exception", an MSVCVersionNotFound exception is raised. When the active policy
is "warning" or "warn", a VisualCMissingWarning warning is issued and the constructed
environment is likely incomplete. When the active policy is "ignore" or "suppress", no action
is taken and the constructed environment is likely incomplete. As implemented, the default
global policy is "warning". The ability to set the global policy via an SCons command-line
option may be added in a future enhancement.


DEPRECATED FUNCTIONALITY
Expand Down Expand Up @@ -134,6 +147,12 @@ FIXES
- The system environment variable names imported for MSVC 7.0 and 6.0 were updated to be
consistent with the variables names defined by their respective installers. This fixes an
error caused when bypassing MSVC detection by specifying the MSVC 7.0 batch file directly.
- Suppress issuing a warning when there are no installed Visual Studio instances for the default
tools configuration (issue #2813). When msvc is the default compiler because there are no
compilers installed, a build may fail due to the cl.exe command not being recognized. At
present, there is no easy way to detect during msvc initialization if the default environment
will be used later to build a program and/or library. There is no error/warning issued for the
default tools as there are legitimate SCons uses that do not require a c compiler.

IMPROVEMENTS
------------
Expand Down
4 changes: 3 additions & 1 deletion SCons/Tool/MSCommon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@

from SCons.Tool.MSCommon.vc import (
msvc_exists,
msvc_setup_env,
msvc_setup_env_tool,
msvc_setup_env_once,
msvc_version_to_maj_min,
msvc_find_vswhere,
set_msvc_notfound_policy,
get_msvc_notfound_policy,
)

from SCons.Tool.MSCommon.vs import (
Expand Down
Loading