diff options
author | John W. Parent <45471568+johnwparent@users.noreply.github.com> | 2024-07-10 13:46:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-10 12:46:13 -0500 |
commit | 4f18cab8d215f90d186e35f6b585ff30a436e3c6 (patch) | |
tree | ec9c10b7364da7f2b2a6e1312a70f89866d342b2 | |
parent | e6f1b4e63a6011675921df984e02277c58a22c2b (diff) | |
download | spack-4f18cab8d215f90d186e35f6b585ff30a436e3c6.tar.gz spack-4f18cab8d215f90d186e35f6b585ff30a436e3c6.tar.bz2 spack-4f18cab8d215f90d186e35f6b585ff30a436e3c6.tar.xz spack-4f18cab8d215f90d186e35f6b585ff30a436e3c6.zip |
Cpuinfo: static build when on Windows (#44899)
* Mirror cpuinfo CI for msvc
-rw-r--r-- | var/spack/repos/builtin/packages/cpuinfo/package.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/cpuinfo/package.py b/var/spack/repos/builtin/packages/cpuinfo/package.py index 4d1cb8fc22..c067f5161f 100644 --- a/var/spack/repos/builtin/packages/cpuinfo/package.py +++ b/var/spack/repos/builtin/packages/cpuinfo/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import sys + from spack.package import * @@ -32,12 +34,16 @@ class Cpuinfo(CMakePackage): depends_on("cmake@3.5:", type="build") def cmake_args(self): + # cpuinfo cannot produce a shared build with MSVC because it does not export + # any symbols + # cpuinfo CI builds "default" on Windows platform + build_type = "default" if sys.platform == "win32" else "shared" # https://salsa.debian.org/deeplearning-team/cpuinfo/-/blob/master/debian/rules return [ self.define("CPUINFO_BUILD_UNIT_TESTS", False), self.define("CPUINFO_BUILD_MOCK_TESTS", False), self.define("CPUINFO_BUILD_BENCHMARKS", False), - self.define("CPUINFO_LIBRARY_TYPE", "shared"), + self.define("CPUINFO_LIBRARY_TYPE", build_type), self.define("CPUINFO_LOG_LEVEL", "error"), self.define("CMAKE_SKIP_RPATH", True), ] |