diff options
author | Jared Popelar <jdpopelar@gmail.com> | 2023-09-27 09:58:12 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 09:58:12 -0600 |
commit | d9724597eded17784b395b324d653305f3bf0e90 (patch) | |
tree | f09675ccc3cd6dd266d16dc014fd2a50a31f4908 /var/spack/repos/builtin/packages/pcre/package.py | |
parent | c90c946d52615ea56eed2e5f16e00a6343f2572b (diff) | |
download | spack-d9724597eded17784b395b324d653305f3bf0e90.tar.gz spack-d9724597eded17784b395b324d653305f3bf0e90.tar.bz2 spack-d9724597eded17784b395b324d653305f3bf0e90.tar.xz spack-d9724597eded17784b395b324d653305f3bf0e90.zip |
Trilinos package: build on Windows (#34622)
Update Trilinos and dependencies to build a limited version of Trilinos
on Windows.
* Support trilinos~mpi~shared on Windows
* superlu: force CMake build on Windows
* boost: update to build on Windows (proper option formatting and
build tool names)
* pcre, openblas: add CMake-based build (keep prior build system
as default on platforms other than Windows)
* openblas: add patch when using Intel Fortran compiler (currently
this is included as part of the hybrid %msvc compiler in Spack)
Co-authored-by: John Parent <john.parent@kitware.com>
Diffstat (limited to 'var/spack/repos/builtin/packages/pcre/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/pcre/package.py | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index 4e6e047335..4719f5ea37 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -3,10 +3,12 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import spack.build_systems.autotools +import spack.build_systems.cmake from spack.package import * -class Pcre(AutotoolsPackage): +class Pcre(AutotoolsPackage, CMakePackage): """The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.""" @@ -26,6 +28,8 @@ class Pcre(AutotoolsPackage): maintainers("drkennetz") patch("intel.patch", when="@8.38") + build_system("autotools", "cmake", default="autotools") + variant("jit", default=False, description="Enable JIT support.") variant("multibyte", default=True, description="Enable support for 16 and 32 bit characters.") @@ -36,6 +40,8 @@ class Pcre(AutotoolsPackage): description="Enable support for UTF-8/16/32, " "incompatible with EBCDIC.", ) + +class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): def configure_args(self): args = [] @@ -51,3 +57,21 @@ class Pcre(AutotoolsPackage): args.append("--enable-unicode-properties") return args + + +class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): + def cmake_args(self): + args = [] + + if "+jit" in self.spec: + args.append("-DPCRE_SUPPORT_JIT:BOOL=ON") + + if "+multibyte" in self.spec: + args.append("-DPCRE_BUILD_PCRE16:BOOL=ON") + args.append("-DPCRE_BUILD_PCRE32:BOOL=ON") + + if "+utf" in self.spec: + args.append("-DPCRE_SUPPORT_UTF:BOOL=ON") + args.append("-DPCRE_SUPPORT_UNICODE_PROPERTIES:BOOL=ON") + + return args |