pnetcdf: New versions and examples option (#48018)
* New pnetcdf versions and examples option * Refine spec for GCC workaround * Refactor examples variant to conflict with older versions Co-authored-by: Sergey Kosukhin <skosukhin@gmail.com> --------- Co-authored-by: Sergey Kosukhin <skosukhin@gmail.com>
This commit is contained in:
parent
82fc0c702d
commit
de45c90056
@ -36,6 +36,8 @@ def url_for_version(self, version):
|
|||||||
return url
|
return url
|
||||||
|
|
||||||
version("master", branch="master")
|
version("master", branch="master")
|
||||||
|
version("1.14.0", sha256="575f189fb01c53f93b3d6ae0e506f46e19694807c81af0b9548e947995acf704")
|
||||||
|
version("1.13.0", sha256="aba0f1c77a51990ba359d0f6388569ff77e530ee574e40592a1e206ed9b2c491")
|
||||||
version("1.12.3", sha256="439e359d09bb93d0e58a6e3f928f39c2eae965b6c97f64e67cd42220d6034f77")
|
version("1.12.3", sha256="439e359d09bb93d0e58a6e3f928f39c2eae965b6c97f64e67cd42220d6034f77")
|
||||||
version("1.12.2", sha256="3ef1411875b07955f519a5b03278c31e566976357ddfc74c2493a1076e7d7c74")
|
version("1.12.2", sha256="3ef1411875b07955f519a5b03278c31e566976357ddfc74c2493a1076e7d7c74")
|
||||||
version("1.12.1", sha256="56f5afaa0ddc256791c405719b6436a83b92dcd5be37fe860dea103aee8250a2")
|
version("1.12.1", sha256="56f5afaa0ddc256791c405719b6436a83b92dcd5be37fe860dea103aee8250a2")
|
||||||
@ -58,6 +60,8 @@ def url_for_version(self, version):
|
|||||||
variant("pic", default=True, description="Produce position-independent code (for shared libs)")
|
variant("pic", default=True, description="Produce position-independent code (for shared libs)")
|
||||||
variant("shared", default=True, description="Enable shared library")
|
variant("shared", default=True, description="Enable shared library")
|
||||||
variant("burstbuffer", default=False, description="Enable burst buffer feature")
|
variant("burstbuffer", default=False, description="Enable burst buffer feature")
|
||||||
|
variant("examples", default=False, description="Install example programs")
|
||||||
|
conflicts("+examples", when="@:1.12")
|
||||||
|
|
||||||
depends_on("mpi")
|
depends_on("mpi")
|
||||||
|
|
||||||
@ -122,14 +126,14 @@ def configure_args(self):
|
|||||||
|
|
||||||
flags = {"CFLAGS": [], "CXXFLAGS": [], "FFLAGS": [], "FCFLAGS": []}
|
flags = {"CFLAGS": [], "CXXFLAGS": [], "FFLAGS": [], "FCFLAGS": []}
|
||||||
|
|
||||||
if "+pic" in self.spec:
|
if self.spec.satisfies("+pic"):
|
||||||
flags["CFLAGS"].append(self.compiler.cc_pic_flag)
|
flags["CFLAGS"].append(self.compiler.cc_pic_flag)
|
||||||
flags["CXXFLAGS"].append(self.compiler.cxx_pic_flag)
|
flags["CXXFLAGS"].append(self.compiler.cxx_pic_flag)
|
||||||
flags["FFLAGS"].append(self.compiler.f77_pic_flag)
|
flags["FFLAGS"].append(self.compiler.f77_pic_flag)
|
||||||
flags["FCFLAGS"].append(self.compiler.fc_pic_flag)
|
flags["FCFLAGS"].append(self.compiler.fc_pic_flag)
|
||||||
|
|
||||||
# https://github.com/Parallel-NetCDF/PnetCDF/issues/61
|
# https://github.com/Parallel-NetCDF/PnetCDF/issues/61
|
||||||
if self.spec.satisfies("%gcc@10:"):
|
if self.spec.satisfies("@:1.12.1%gcc@10:"):
|
||||||
flags["FFLAGS"].append("-fallow-argument-mismatch")
|
flags["FFLAGS"].append("-fallow-argument-mismatch")
|
||||||
flags["FCFLAGS"].append("-fallow-argument-mismatch")
|
flags["FCFLAGS"].append("-fallow-argument-mismatch")
|
||||||
|
|
||||||
@ -137,19 +141,22 @@ def configure_args(self):
|
|||||||
if value:
|
if value:
|
||||||
args.append(f"{key}={' '.join(value)}")
|
args.append(f"{key}={' '.join(value)}")
|
||||||
|
|
||||||
if self.version >= Version("1.8"):
|
if self.spec.satisfies("@1.8:"):
|
||||||
args.append("--enable-relax-coord-bound")
|
args.append("--enable-relax-coord-bound")
|
||||||
|
|
||||||
if self.version >= Version("1.9"):
|
if self.spec.satisfies("@1.9:"):
|
||||||
args += self.enable_or_disable("shared")
|
args += self.enable_or_disable("shared")
|
||||||
args.extend(["--enable-static", "--disable-silent-rules"])
|
args.extend(["--enable-static", "--disable-silent-rules"])
|
||||||
|
|
||||||
if self.spec.satisfies("%nag+fortran+shared"):
|
if self.spec.satisfies("%nag+fortran+shared"):
|
||||||
args.extend(["ac_cv_prog_fc_v=-Wl,-v", "ac_cv_prog_f77_v=-Wl,-v"])
|
args.extend(["ac_cv_prog_fc_v=-Wl,-v", "ac_cv_prog_f77_v=-Wl,-v"])
|
||||||
|
|
||||||
if "+burstbuffer" in self.spec:
|
if self.spec.satisfies("+burstbuffer"):
|
||||||
args.append("--enable-burst-buffering")
|
args.append("--enable-burst-buffering")
|
||||||
|
|
||||||
|
if self.spec.satisfies("+examples"):
|
||||||
|
args.append("--enable-install-examples")
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
examples_src_dir = join_path("examples", "CXX")
|
examples_src_dir = join_path("examples", "CXX")
|
||||||
|
Loading…
Reference in New Issue
Block a user