vcpkg/ports/blaze/portfile.cmake

30 lines
764 B
CMake
Raw Normal View History

vcpkg_from_bitbucket(
OUT_SOURCE_PATH SOURCE_PATH
REPO blaze-lib/blaze
REF "v${VERSION}"
SHA512 9786628159991f547902ceb44a159f0ba84d08be16ccc45bfb9aad3cfbf16eaede4ea43d2d4981d420a8a387a07721b113754f6038a6db2d9c7ed2ea967b5361
HEAD_REF master
)
[blaze] Add lapack and openmp features (#36786) Hi, this PR adds two feature flags to Blaze to allow for a minimal 'core' installation: 1. `lapack`: LAPACK/BLAS is currently a default dependency, but its only required for certain matrix operations and `BLAZE_BLAS_MODE` which is off by default. See [CMakeLists.txt#L65-L75](https://bitbucket.org/blaze-lib/blaze/src/3156507a4b7a6a9cd413ef87df0a0aa2b1c697d9/CMakeLists.txt#lines-65:75). 2. `openmp`: The absence of this flag actually disables SMP support entirely, so it might be better to just use `smp` instead. Thoughts? I used `openmp` for consistency with the existing port which explicitly sets the threading library via `BLAZE_SMP_THREADS=OpenMP`. In any case, Blaze defaults to OpenMP and removes `BLAZE_SMP_THREADS` from cache when `BLAZE_SHARED_MEMORY_PARALLELIZATION` is turned off. See [CMakeLists.txt#L297-L304](https://bitbucket.org/blaze-lib/blaze/src/3156507a4b7a6a9cd413ef87df0a0aa2b1c697d9/CMakeLists.txt#lines-297:304). Both of these are still set as default features to ensure compatibility, though I think the default LAPACK REQUIRED as a reminder to package maintainers might be a bit excessive! If you're using LAPACK, you probably aren't relying on Blaze to import it for you. That's probably more of a discussion for upstream in any case. - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] ~~SHA512s are updated for each updated download.~~ - [ ] ~~The "supports" clause reflects platforms that may be fixed by this new version.~~ - [ ] ~~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - [ ] ~~Any patches that are no longer applied are deleted from the port's directory.~~ - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
2024-02-22 14:30:03 +08:00
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
lapack USE_LAPACK
openmp BLAZE_SHARED_MEMORY_PARALLELIZATION
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
[blaze] Add lapack and openmp features (#36786) Hi, this PR adds two feature flags to Blaze to allow for a minimal 'core' installation: 1. `lapack`: LAPACK/BLAS is currently a default dependency, but its only required for certain matrix operations and `BLAZE_BLAS_MODE` which is off by default. See [CMakeLists.txt#L65-L75](https://bitbucket.org/blaze-lib/blaze/src/3156507a4b7a6a9cd413ef87df0a0aa2b1c697d9/CMakeLists.txt#lines-65:75). 2. `openmp`: The absence of this flag actually disables SMP support entirely, so it might be better to just use `smp` instead. Thoughts? I used `openmp` for consistency with the existing port which explicitly sets the threading library via `BLAZE_SMP_THREADS=OpenMP`. In any case, Blaze defaults to OpenMP and removes `BLAZE_SMP_THREADS` from cache when `BLAZE_SHARED_MEMORY_PARALLELIZATION` is turned off. See [CMakeLists.txt#L297-L304](https://bitbucket.org/blaze-lib/blaze/src/3156507a4b7a6a9cd413ef87df0a0aa2b1c697d9/CMakeLists.txt#lines-297:304). Both of these are still set as default features to ensure compatibility, though I think the default LAPACK REQUIRED as a reminder to package maintainers might be a bit excessive! If you're using LAPACK, you probably aren't relying on Blaze to import it for you. That's probably more of a discussion for upstream in any case. - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] ~~SHA512s are updated for each updated download.~~ - [ ] ~~The "supports" clause reflects platforms that may be fixed by this new version.~~ - [ ] ~~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - [ ] ~~Any patches that are no longer applied are deleted from the port's directory.~~ - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
2024-02-22 14:30:03 +08:00
${FEATURE_OPTIONS}
2020-02-29 13:44:18 +08:00
-DBLAZE_SMP_THREADS=OpenMP
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH share/blaze/cmake)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
2017-07-17 21:43:46 +08:00
# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")