Skip to content

Commit

Permalink
[Openturns] burn in linkage and fix deps (microsoft#37234)
Browse files Browse the repository at this point in the history
  • Loading branch information
Neumann-A authored Mar 12, 2024
1 parent 919fd8d commit accfd32
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 2 deletions.
23 changes: 23 additions & 0 deletions ports/openturns/fix-dep.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/lib/OpenTURNSConfig.cmake.in b/lib/OpenTURNSConfig.cmake.in
index 1247591893..c12e423892 100644
--- a/lib/OpenTURNSConfig.cmake.in
+++ b/lib/OpenTURNSConfig.cmake.in
@@ -74,6 +74,17 @@ if ("1" STREQUAL "@HMAT_FOUND@")
find_package (HMAT REQUIRED NO_MODULE PATHS ${HMAT_DIR} NO_DEFAULT_PATH)
endif ()

+include(CMakeFindDependencyMacro)
+find_dependency(Eigen3 CONFIG)
+find_dependency(TBB CONFIG)
+find_dependency(Spectra)
+find_dependency(NLopt)
+find_dependency(dlib)
+find_dependency(HDF5)
+find_dependency(Ceres CONFIG)
+find_dependency(Pagmo CONFIG)
+find_dependency(CMinpack CONFIG)
+
# Our library dependencies (contains definitions for IMPORTED targets)
include("${CMAKE_CURRENT_LIST_DIR}/OpenTURNS-Targets.cmake")


6 changes: 6 additions & 0 deletions ports/openturns/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
link-gmp.patch
reorder-mpc.patch
fix-dep.patch
)

vcpkg_find_acquire_program(FLEX)
Expand Down Expand Up @@ -51,6 +52,11 @@ vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/OpenTURNSConfig.cmake" "/lib/cmake/" "/share/")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/OpenTURNSConfig.cmake" "/lib" "$<$<CONFIG:DEBUG>:/debug>/lib")

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/openturns/OTdebug.h" "#ifndef OT_STATIC" "#if 0")
else()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/openturns/OTdebug.h" "#ifndef OT_STATIC" "#if 1")
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
Expand Down
2 changes: 1 addition & 1 deletion ports/openturns/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openturns",
"version": "1.20",
"port-version": 1,
"port-version": 2,
"description": "OpenTURNS is a scientific C++ and Python library featuring an internal data model and algorithms dedicated to the treatment of uncertainties.",
"homepage": "http://www.openturns.org",
"license": null,
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6494,7 +6494,7 @@
},
"openturns": {
"baseline": "1.20",
"port-version": 1
"port-version": 2
},
"openvdb": {
"baseline": "11.0.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openturns.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "55e0a233063acabd3fe365687fda3f99d6e79f4c",
"version": "1.20",
"port-version": 2
},
{
"git-tree": "1533ede792f48bee5c53f35de06c493e6ed0ab0a",
"version": "1.20",
Expand Down

0 comments on commit accfd32

Please sign in to comment.