add utilities and examples variants to conduit (#33804)

This commit is contained in:
Chris White 2022-11-10 10:05:24 -08:00 committed by GitHub
parent ad0d908d8d
commit 3ea4b53bf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,8 +67,10 @@ class Conduit(CMakePackage):
# package variants # package variants
########################################################################### ###########################################################################
variant("examples", default=True, description="Build Conduit examples")
variant("shared", default=True, description="Build Conduit as shared libs") variant("shared", default=True, description="Build Conduit as shared libs")
variant("test", default=True, description="Enable Conduit unit tests") variant("test", default=True, description="Enable Conduit unit tests")
variant("utilities", default=True, description="Build Conduit utilities")
# variants for python support # variants for python support
variant("python", default=False, description="Build Conduit Python support") variant("python", default=False, description="Build Conduit Python support")
@ -375,6 +377,19 @@ def hostconfig(self):
if flags: if flags:
cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags, description)) cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags, description))
#######################
# Examples/Utilities
#######################
if "+examples" in spec:
cfg.write(cmake_cache_entry("ENABLE_EXAMPLES", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_EXAMPLES", "OFF"))
if "+utilities" in spec:
cfg.write(cmake_cache_entry("ENABLE_UTILS", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_UTILS", "OFF"))
####################### #######################
# Unit Tests # Unit Tests
####################### #######################