Skip to content

Commit

Permalink
Updating spack for OpenMP.
Browse files Browse the repository at this point in the history
This commit references #453
  • Loading branch information
EricEngle-NOAA committed Oct 24, 2023
1 parent 471f172 commit d6bbaea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/Spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
variants: ["libs=shared +png+jasper~openjpeg+pic+pthreads+utils+build_g2c", "libs=static ~png~jasper+openjpeg~pic~pthreads~utils~build_g2c"]
variants: ["libs=shared +png+jasper~openjpeg+pic+pthreads+openmp+utils+build_g2c",
"libs=static ~png~jasper+openjpeg~pic~pthreads~openmp~utils~build_g2c"]
runs-on: ${{ matrix.os }}

steps:
Expand Down
6 changes: 6 additions & 0 deletions spack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ class G2c(CMakePackage):
description="Build shared libs, static libs or both",
when="@1.7:",
)
variant(
"openmp",
default=False,
description="Turn on OpenMP threading",
when="@develop",
variant(
"pthreads",
default=False,
Expand Down Expand Up @@ -69,6 +74,7 @@ def cmake_args(self):
self.define_from_variant("USE_Jasper", "jasper"),
self.define_from_variant("USE_OpenJPEG", "openjpeg"),
self.define_from_variant("PTHREADS", "pthreads"),
self.define_from_variant("OPENMP", "openmp"),
self.define_from_variant("UTILS", "utils"),
self.define_from_variant("BUILD_G2C", "build_g2c"),
self.define("BUILD_TESTING", self.run_tests),
Expand Down

0 comments on commit d6bbaea

Please sign in to comment.