summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn W. Parent <45471568+johnwparent@users.noreply.github.com>2023-03-14 19:46:49 -0400
committerGitHub <noreply@github.com>2023-03-14 16:46:49 -0700
commitcd42fc5cc8dfda473643f40d359fc3d68d7906fb (patch)
tree387c7b1d6f18f7e02936c32c3ccb2e2c950165d5 /lib
parent9a1254063a9e1c2fcd137359c82a7c6ba753c123 (diff)
downloadspack-cd42fc5cc8dfda473643f40d359fc3d68d7906fb.tar.gz
spack-cd42fc5cc8dfda473643f40d359fc3d68d7906fb.tar.bz2
spack-cd42fc5cc8dfda473643f40d359fc3d68d7906fb.tar.xz
spack-cd42fc5cc8dfda473643f40d359fc3d68d7906fb.zip
Libogg and libtheora: build on windows (#35099)
Adds builders appropriate for building these packages on Windows. It is intended that builds on other platforms are unaffected (e.g. they build with Autotools as before on Linux).
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compilers/msvc.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/spack/spack/compilers/msvc.py b/lib/spack/spack/compilers/msvc.py
index 7a8432ecfa..9be10b0826 100644
--- a/lib/spack/spack/compilers/msvc.py
+++ b/lib/spack/spack/compilers/msvc.py
@@ -122,7 +122,19 @@ class Msvc(Compiler):
@property
def cl_version(self):
"""Cl toolset version"""
- return spack.compiler.get_compiler_version_output(self.cc)
+ return Version(
+ re.search(
+ Msvc.version_regex,
+ spack.compiler.get_compiler_version_output(self.cc, version_arg=None),
+ ).group(1)
+ )
+
+ @property
+ def vs_root(self):
+ # The MSVC install root is located at a fix level above the compiler
+ # and is referenceable idiomatically via the pattern below
+ # this should be consistent accross versions
+ return os.path.abspath(os.path.join(self.cc, "../../../../../../../.."))
def setup_custom_environment(self, pkg, env):
"""Set environment variables for MSVC using the