Skip to content

Commit

Permalink
[highfive] Add eigen3 feature option (#21897)
Browse files Browse the repository at this point in the history
* [highfive] Add eigen3 feature option

* update version

* update version

* dd double quotes to the paths

* update version

* apply review suggestion

* update version

* update review suggesstion

* update version

* update patches

* update version

* update patches

* update version
  • Loading branch information
JonLiu1993 committed Dec 10, 2021
1 parent d3cb28e commit 5420dab
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
15 changes: 15 additions & 0 deletions ports/highfive/fix-error-C1128.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d42b6e..e6d9f18 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,10 @@ option(HIGHFIVE_BUILD_DOCS "Enable documentation building" ON)
option(HIGHFIVE_USE_INSTALL_DEPS "End applications by default use detected dependencies here" OFF)
mark_as_advanced(HIGHFIVE_USE_INSTALL_DEPS)

+# Allow big object
+if(MSVC)
+ add_compile_options(/bigobj)
+endif()

# Check compiler cxx_std requirements
# -----------------------------------
18 changes: 9 additions & 9 deletions ports/highfive/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ vcpkg_from_github(
REF v2.3
SHA512 5bf8bc6d3a57be39a4fd15f28f8c839706e2c8d6e2270f45ea39c28a2ac1e3c7f31ed2f48390a45a868c714c85f03f960a0bc8fad945c80b41f495e6f4aca36a
HEAD_REF master
PATCHES fix-dependency-hdf5.patch
PATCHES
fix-dependency-hdf5.patch
fix-error-C1128.patch
)

vcpkg_check_features(
Expand All @@ -13,17 +15,15 @@ vcpkg_check_features(
boost HIGHFIVE_USE_BOOST
tests HIGHFIVE_UNIT_TESTS
xtensor HIGHFIVE_USE_XTENSOR
eigen3 HIGHFIVE_USE_EIGEN
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" HDF5_USE_STATIC_LIBRARIES)

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DHIGHFIVE_EXAMPLES=OFF
-DHIGHFIVE_BUILD_DOCS=OFF
-DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES}
)

vcpkg_cmake_install()
Expand All @@ -40,10 +40,10 @@ endif()

vcpkg_cmake_config_fixup(CONFIG_PATH share/HighFive/CMake)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
if(NOT (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/HighFive)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
if(NOT VCPKG_TARGET_IS_UWP AND NOT VCPKG_TARGET_IS_OSX)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/HighFive")
endif()

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
8 changes: 8 additions & 0 deletions ports/highfive/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "highfive",
"version": "2.3",
"port-version": 1,
"description": "HighFive is a modern header-only C++/C++11 friendly interface for libhdf5",
"homepage": "https://github.com/BlueBrain/HighFive",
"license": "BSL-1.0",
Expand All @@ -21,9 +22,16 @@
"dependencies": [
"boost-multi-array",
"boost-serialization",
"boost-system",
"boost-ublas"
]
},
"eigen3": {
"description": "Enable Eigen testing",
"dependencies": [
"eigen3"
]
},
"tests": {
"description": "Build unit tests",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2690,7 +2690,7 @@
},
"highfive": {
"baseline": "2.3",
"port-version": 0
"port-version": 1
},
"highway": {
"baseline": "0.14.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/h-/highfive.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e2f9f257e00960a16a162c1f279406f48528db5a",
"version": "2.3",
"port-version": 1
},
{
"git-tree": "76c01340920e595af976269dec82132f192a4705",
"version": "2.3",
Expand Down

0 comments on commit 5420dab

Please sign in to comment.