add flag to turn off building tests and examples (#44075)
This commit is contained in:
parent
ddf94291d4
commit
9ab6c30a3d
@ -31,6 +31,8 @@ class Compadre(CMakePackage):
|
|||||||
variant("mpi", default=False, description="Enable MPI support")
|
variant("mpi", default=False, description="Enable MPI support")
|
||||||
depends_on("mpi", when="+mpi")
|
depends_on("mpi", when="+mpi")
|
||||||
|
|
||||||
|
variant("tests", default=True, description="Enable tests and examples")
|
||||||
|
|
||||||
# fixes duplicate symbol issue with static library build
|
# fixes duplicate symbol issue with static library build
|
||||||
patch(
|
patch(
|
||||||
"https://patch-diff.githubusercontent.com/raw/sandialabs/Compadre/pull/286.patch?full_index=1",
|
"https://patch-diff.githubusercontent.com/raw/sandialabs/Compadre/pull/286.patch?full_index=1",
|
||||||
@ -56,6 +58,10 @@ def cmake_args(self):
|
|||||||
if "+mpi" in spec:
|
if "+mpi" in spec:
|
||||||
options.append("-DCompadre_USE_MPI:BOOL=ON")
|
options.append("-DCompadre_USE_MPI:BOOL=ON")
|
||||||
|
|
||||||
|
if "~tests" in spec:
|
||||||
|
options.append("-DCompadre_EXAMPLES:BOOL=OFF")
|
||||||
|
options.append("-DCompadre_TESTS:BOOL=OFF")
|
||||||
|
|
||||||
if "+shared" in spec:
|
if "+shared" in spec:
|
||||||
options.append("-DBUILD_SHARED_LIBS:BOOL=ON")
|
options.append("-DBUILD_SHARED_LIBS:BOOL=ON")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user