summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJohn W. Parent <45471568+johnwparent@users.noreply.github.com>2023-05-25 18:41:16 -0400
committerGitHub <noreply@github.com>2023-05-25 15:41:16 -0700
commit682f0b2a543c56a191a2d8f3b785c97f7a5cb488 (patch)
tree7c2b4dbbc6e80ec45efa20872c29e870be1d8b90 /var
parentdbab0c1ff5d2d4f9d3a3d3f5d20dcec7e347da9e (diff)
downloadspack-682f0b2a543c56a191a2d8f3b785c97f7a5cb488.tar.gz
spack-682f0b2a543c56a191a2d8f3b785c97f7a5cb488.tar.bz2
spack-682f0b2a543c56a191a2d8f3b785c97f7a5cb488.tar.xz
spack-682f0b2a543c56a191a2d8f3b785c97f7a5cb488.zip
Protobuf package: CMake fix for Windows build (#37926)
Qualify reference with namespace. A pending upstream PR will eventually make this unnecessary, so the patch is only applied for 3.22. versions.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/protobuf/msvc-abseil-target-namespace.patch13
-rw-r--r--var/spack/repos/builtin/packages/protobuf/package.py2
2 files changed, 15 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/protobuf/msvc-abseil-target-namespace.patch b/var/spack/repos/builtin/packages/protobuf/msvc-abseil-target-namespace.patch
new file mode 100644
index 0000000000..0cb9e3d4af
--- /dev/null
+++ b/var/spack/repos/builtin/packages/protobuf/msvc-abseil-target-namespace.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/abseil-cpp.cmake b/cmake/abseil-cpp.cmake
+index e7bfb2b15..61fcd678d 100644
+--- a/cmake/abseil-cpp.cmake
++++ b/cmake/abseil-cpp.cmake
+@@ -39,7 +39,7 @@ set(_protobuf_FIND_ABSL "if(NOT TARGET absl::strings)\n find_package(absl CONFI
+
+ if (BUILD_SHARED_LIBS AND MSVC)
+ # On MSVC Abseil is bundled into a single DLL.
+- set(protobuf_ABSL_USED_TARGETS abseil_dll)
++ set(protobuf_ABSL_USED_TARGETS absl::abseil_dll)
+
+ set(protobuf_ABSL_USED_TEST_TARGETS abseil_test_dll)
+ else()
diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py
index a7bab9e6b8..295e57850e 100644
--- a/var/spack/repos/builtin/packages/protobuf/package.py
+++ b/var/spack/repos/builtin/packages/protobuf/package.py
@@ -102,6 +102,8 @@ class Protobuf(CMakePackage):
sha256="fa1abf042eddc1b3b43875dc018c651c90cd1c0c5299975a818a1610bee54ab8",
)
+ patch("msvc-abseil-target-namespace.patch", when="@3.22 %msvc")
+
def fetch_remote_versions(self, *args, **kwargs):
"""Ignore additional source artifacts uploaded with releases,
only keep known versions