Add static-only option for ESMF (#34576)
This commit is contained in:
		| @@ -89,6 +89,7 @@ class Esmf(MakefilePackage): | |||||||
|         when="@8.3.0b09", |         when="@8.3.0b09", | ||||||
|     ) |     ) | ||||||
|     variant("debug", default=False, description="Make a debuggable version of the library") |     variant("debug", default=False, description="Make a debuggable version of the library") | ||||||
|  |     variant("shared", default=True, description="Build shared library") | ||||||
| 
 | 
 | ||||||
|     # Required dependencies |     # Required dependencies | ||||||
|     depends_on("zlib") |     depends_on("zlib") | ||||||
| @@ -358,6 +359,10 @@ def edit(self, spec, prefix): | |||||||
|             # ESMF_XERCES_INCLUDE |             # ESMF_XERCES_INCLUDE | ||||||
|             # ESMF_XERCES_LIBPATH |             # ESMF_XERCES_LIBPATH | ||||||
| 
 | 
 | ||||||
|  |         # Static-only option: | ||||||
|  |         if "~shared" in spec: | ||||||
|  |             os.environ["ESMF_SHARED_LIB_BUILD"] = "OFF" | ||||||
|  | 
 | ||||||
|     @run_after("install") |     @run_after("install") | ||||||
|     def install_findesmf(self): |     def install_findesmf(self): | ||||||
|         install_tree("cmake", self.prefix.cmake) |         install_tree("cmake", self.prefix.cmake) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Alex Richert
					Alex Richert