From 4b186df5b4a96fee0752f25ec6c56fced87f5b23 Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Mon, 30 Jan 2023 05:15:54 -0500 Subject: [PATCH] adios2: allow building on Windows (#35102) --- .../repos/builtin/packages/adios2/package.py | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 873eb376e3..2a075a3a7c 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -54,7 +54,6 @@ class Adios2(CMakePackage, CudaPackage): # change how we're supporting differnt library types in the package at anytime if # spack decides on a standardized way of doing it across packages variant("shared", default=True, when="+pic", description="Build shared libraries") - variant("pic", default=True, description="Build pic-enabled static libraries") # Features variant("mpi", default=True, description="Enable MPI") @@ -95,12 +94,24 @@ class Adios2(CMakePackage, CudaPackage): conflicts("%oneapi@:2022.1.0", when="+fortran") depends_on("cmake@3.12.0:", type="build") - depends_on("pkgconfig", type="build") - depends_on("libffi", when="+sst") # optional in DILL - depends_on("libfabric@1.6.0:", when="+sst") # optional in EVPath and SST - # depends_on('bison', when='+sst') # optional in FFS, broken package - # depends_on('flex', when='+sst') # optional in FFS, depends on BISON + for _platform in ["linux", "darwin", "cray"]: + depends_on("pkgconfig", type="build", when="platform=%s" % _platform) + variant( + "pic", + default=False, + description="Build pic-enabled static libraries", + when="platform=%s" % _platform, + ) + # libffi and libfabric and not currently supported on Windows + # see Paraview's superbuild handling of libfabric at + # https://gitlab.kitware.com/paraview/paraview-superbuild/-/blob/master/projects/adios2.cmake#L3 + depends_on("libffi", when="+sst platform=%s" % _platform) # optional in DILL + depends_on( + "libfabric@1.6.0:", when="+sst platform=%s" % _platform + ) # optional in EVPath and SST + # depends_on('bison', when='+sst') # optional in FFS, broken package + # depends_on('flex', when='+sst') # optional in FFS, depends on BISON depends_on("mpi", when="+mpi") depends_on("libzmq", when="+dataman")