Skip to content

Commit

Permalink
[libmesh] (microsoft#22775)
Browse files Browse the repository at this point in the history
- build only opt flavor for release build
- build only dbg flavor for debug build
- install libmesh examples under tools/libmesh/
  • Loading branch information
mkhon authored Mar 25, 2022
1 parent a95ee82 commit 85d85f3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
22 changes: 9 additions & 13 deletions ports/libmesh/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,23 @@ endif()
vcpkg_configure_make(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS ${OPTIONS}
OPTIONS_DEBUG --with-methods=dbg
OPTIONS_RELEASE --with-methods=opt
)

vcpkg_install_make()

if (EXISTS ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool)
file(COPY ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(COPY ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(REMOVE ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/contrib ${CURRENT_PACKAGES_DIR}/debug/contrib)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/contrib)

file(GLOB ${CURRENT_PACKAGES_DIR}/bin LIBMESH_TOOLS)
foreach (LIBMESH_TOOL ${LIBMESH_TOOLS})
file(COPY ${LIBMESH_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE ${LIBMESH_TOOL})
endforeach()

file(GLOB LIBMESH_TOOLS ${CURRENT_PACKAGES_DIR}/examples/*)
foreach (LIBMESH_TOOL ${LIBMESH_TOOLS})
file(COPY ${LIBMESH_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE ${LIBMESH_TOOL})
file(GLOB LIBMESH_EXAMPLES ${CURRENT_PACKAGES_DIR}/examples/*)
foreach (LIBMESH_EXAMPLE ${LIBMESH_EXAMPLES})
file(COPY ${LIBMESH_EXAMPLE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
endforeach()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/examples)

if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
Expand All @@ -47,7 +43,7 @@ endif()
# Remove tools and debug include directories
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/contrib ${CURRENT_PACKAGES_DIR}/debug/etc
${CURRENT_PACKAGES_DIR}/debug/examples ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/tools/libmesh/debug
${CURRENT_PACKAGES_DIR}/Make.common ${CURRENT_PACKAGES_DIR}/debug/Make.common)

vcpkg_copy_pdbs()
Expand Down
5 changes: 3 additions & 2 deletions ports/libmesh/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "libmesh",
"version-string": "1.5.0",
"port-version": 2,
"port-version": 3,
"description": "The libMesh library provides a framework for the numerical simulation of partial differential equations using arbitrary unstructured discretizations on serial and parallel platforms. A major goal of the library is to provide support for adaptive mesh refinement (AMR) computations in parallel while allowing a research scientist to focus on the physics they are modeling.",
"homepage": "https://github.com/libMesh/libmesh"
"homepage": "https://github.com/libMesh/libmesh",
"license": "LGPL-2.1-only"
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3726,7 +3726,7 @@
},
"libmesh": {
"baseline": "1.5.0",
"port-version": 2
"port-version": 3
},
"libmicrohttpd": {
"baseline": "0.9.75",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libmesh.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8583d8a15a7b694bb7a8346580c5f8a3f7478f28",
"version-string": "1.5.0",
"port-version": 3
},
{
"git-tree": "99d2914d8591e790d8d9e16eeb572b2dfa6776d7",
"version-string": "1.5.0",
Expand Down

0 comments on commit 85d85f3

Please sign in to comment.