diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/seacas | |
Diffstat (limited to 'vcpkg/ports/seacas')
| -rw-r--r-- | vcpkg/ports/seacas/deps-and-shared.patch | 784 | ||||
| -rw-r--r-- | vcpkg/ports/seacas/fix-build-error-with-fmt11.patch | 108 | ||||
| -rw-r--r-- | vcpkg/ports/seacas/fix-fmt-10.patch | 28 | ||||
| -rw-r--r-- | vcpkg/ports/seacas/fix-headers.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/seacas/fix-ioss-includes.patch | 25 | ||||
| -rw-r--r-- | vcpkg/ports/seacas/fix-mpi.patch | 85 | ||||
| -rw-r--r-- | vcpkg/ports/seacas/fix_tpl_libs.patch | 288 | ||||
| -rw-r--r-- | vcpkg/ports/seacas/netcdf-c.diff | 10 | ||||
| -rw-r--r-- | vcpkg/ports/seacas/portfile.cmake | 134 | ||||
| -rw-r--r-- | vcpkg/ports/seacas/use-std-localtime.patch | 32 | ||||
| -rw-r--r-- | vcpkg/ports/seacas/vcpkg.json | 75 |
11 files changed, 1582 insertions, 0 deletions
diff --git a/vcpkg/ports/seacas/deps-and-shared.patch b/vcpkg/ports/seacas/deps-and-shared.patch new file mode 100644 index 0000000..c43ac05 --- /dev/null +++ b/vcpkg/ports/seacas/deps-and-shared.patch @@ -0,0 +1,784 @@ +diff --git a/cmake/TPLs/FindTPLMETIS.cmake b/cmake/TPLs/FindTPLMETIS.cmake +index 90911a3cc..bb57e3bf6 100644 +--- a/cmake/TPLs/FindTPLMETIS.cmake ++++ b/cmake/TPLs/FindTPLMETIS.cmake +@@ -53,8 +53,8 @@ + # ************************************************************************ + # @HEADER + +- +-TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( METIS +- REQUIRED_HEADERS metis.h +- REQUIRED_LIBS_NAMES "metis" +- ) ++find_package(metis REQUIRED) ++tribits_extpkg_create_imported_all_libs_target_and_config_file( ++ METIS ++ INNER_FIND_PACKAGE_NAME metis ++ IMPORTED_TARGETS_FOR_ALL_LIBS metis ) +diff --git a/cmake/TPLs/FindTPLMatio.cmake b/cmake/TPLs/FindTPLMatio.cmake +index c76713ab9..f5b8bd702 100644 +--- a/cmake/TPLs/FindTPLMatio.cmake ++++ b/cmake/TPLs/FindTPLMatio.cmake +@@ -56,7 +56,7 @@ if (${CMAKE_VERSION} GREATER "3.13") + cmake_policy(SET CMP0074 NEW) + endif() + +-find_package(Matio REQUIRED) ++list(APPEND CMAKE_FIND_LIBRARY_PREFIXES lib) + TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( Matio + REQUIRED_HEADERS matio.h + REQUIRED_LIBS_NAMES "matio") +diff --git a/cmake/TPLs/FindTPLZlib.cmake b/cmake/TPLs/FindTPLZlib.cmake +index cc607e9d8..069a37c23 100644 +--- a/cmake/TPLs/FindTPLZlib.cmake ++++ b/cmake/TPLs/FindTPLZlib.cmake +@@ -53,8 +53,8 @@ + # ************************************************************************ + # @HEADER + +- +-TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( Zlib +- REQUIRED_HEADERS zlib.h +- REQUIRED_LIBS_NAMES z +- ) ++find_package(ZLIB REQUIRED) ++tribits_extpkg_create_imported_all_libs_target_and_config_file( ++ Zlib ++ INNER_FIND_PACKAGE_NAME ZLIB ++ IMPORTED_TARGETS_FOR_ALL_LIBS ZLIB::ZLIB ) +diff --git a/cmake/TPLs/FindTPLfmt.cmake b/cmake/TPLs/FindTPLfmt.cmake +index c6ec212f9..e38054d9a 100644 +--- a/cmake/TPLs/FindTPLfmt.cmake ++++ b/cmake/TPLs/FindTPLfmt.cmake +@@ -53,8 +53,8 @@ + # ************************************************************************ + # @HEADER + +- +-TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( fmt +- REQUIRED_HEADERS fmt/format.h +- REQUIRED_LIBS_NAMES fmt +- ) ++find_package(fmt REQUIRED) ++tribits_extpkg_create_imported_all_libs_target_and_config_file( ++ fmt ++ INNER_FIND_PACKAGE_NAME fmt ++ IMPORTED_TARGETS_FOR_ALL_LIBS fmt::fmt ) +diff --git a/cmake/tribits/common_tpls/FindTPLCGNS.cmake b/cmake/tribits/common_tpls/FindTPLCGNS.cmake +index 37c329cd4..9d221f64f 100644 +--- a/cmake/tribits/common_tpls/FindTPLCGNS.cmake ++++ b/cmake/tribits/common_tpls/FindTPLCGNS.cmake +@@ -45,14 +45,14 @@ if ((CGNS_ALLOW_MODERN AND HDF5_FOUND_MODERN_CONFIG_FILE) OR CGNS_FORCE_MODERN) + print_var(CGNS_ALLOW_MODERN) + print_var(CGNS_FORCE_MODERN) + message("-- Using find_package(CGNS ${minimum_modern_CGNS_version} CONFIG) ...") +- find_package(CGNS ${minimum_modern_CGNS_version} CONFIG) ++ find_package(cgns CONFIG) + if (CGNS_FOUND) + message("-- Found CGNS_CONFIG=${CGNS_CONFIG}") + message("-- Generating CGNS::all_libs and CGNSConfig.cmake") + tribits_extpkg_create_imported_all_libs_target_and_config_file( + CGNS +- INNER_FIND_PACKAGE_NAME CGNS +- IMPORTED_TARGETS_FOR_ALL_LIBS CGNS::cgns) ++ INNER_FIND_PACKAGE_NAME cgns ++ IMPORTED_TARGETS_FOR_ALL_LIBS CGNS::CGNS) + set(TPL_CGNS_NOT_FOUND FALSE) + endif() + +diff --git a/cmake/tribits/common_tpls/FindTPLHDF5.cmake b/cmake/tribits/common_tpls/FindTPLHDF5.cmake +index 716068c28..3d8fc8e76 100644 +--- a/cmake/tribits/common_tpls/FindTPLHDF5.cmake ++++ b/cmake/tribits/common_tpls/FindTPLHDF5.cmake +@@ -9,7 +9,7 @@ if (Netcdf_ALLOW_MODERN) + set(minimum_modern_HDF5_version 1.10.2) + print_var(Netcdf_ALLOW_MODERN) + message("-- Using find_package(HDF5 ${minimum_modern_HDF5_version} CONFIG) ...") +- find_package(HDF5 ${minimum_modern_HDF5_version} CONFIG) ++ find_package(HDF5) + if (HDF5_FOUND) + message("-- Found HDF5_CONFIG=${HDF5_CONFIG}") + message("-- Generating Netcdf::all_libs and NetcdfConfig.cmake") +@@ -17,7 +17,7 @@ if (Netcdf_ALLOW_MODERN) + tribits_extpkg_create_imported_all_libs_target_and_config_file( + HDF5 + INNER_FIND_PACKAGE_NAME HDF5 +- IMPORTED_TARGETS_FOR_ALL_LIBS ${HDF5_EXPORT_LIBRARIES}) ++ IMPORTED_TARGETS_FOR_ALL_LIBS hdf5::hdf5) + set(HDF5_INTERNAL_IS_MODERN TRUE) + else() + message("-- Could not find HDF5_CONFIG (FindTPLHDF5.cmake)") +@@ -27,7 +27,7 @@ endif() + + set(HDF5_FOUND_MODERN_CONFIG_FILE ${HDF5_INTERNAL_IS_MODERN} CACHE INTERNAL "True if HDF5 was found by the modern method") + +-if (NOT TARGET HDF5::all_libs) ++if (0) + + # First, set up the variables for the (backward-compatible) TriBITS way of + # finding HDF5. These are used in case find_package(HDF5 ...) is not called +diff --git a/cmake/tribits/common_tpls/find_modules/FindCGNS.cmake b/cmake/tribits/common_tpls/find_modules/FindCGNS.cmake +index c2c98f4be..9626cdb92 100644 +--- a/cmake/tribits/common_tpls/find_modules/FindCGNS.cmake ++++ b/cmake/tribits/common_tpls/find_modules/FindCGNS.cmake +@@ -180,7 +180,7 @@ else(CGNS_LIBRARIES AND CGNS_INCLUDE_DIRS) + if (EXISTS "${CGNS_LIBRARY_DIR}") + + find_library(CGNS_LIBRARY +- NAMES cgns ++ NAMES cgnsdll cgns + HINTS ${CGNS_LIBRARY_DIR} + NO_DEFAULT_PATH) + +@@ -196,7 +196,7 @@ else(CGNS_LIBRARIES AND CGNS_INCLUDE_DIRS) + if (EXISTS "${CGNS_ROOT}" ) + + find_library(CGNS_LIBRARY +- NAMES cgns ++ NAMES cgnsdll cgns + HINTS ${CGNS_ROOT} + PATH_SUFFIXES "lib" "Lib" + NO_DEFAULT_PATH) +@@ -210,7 +210,7 @@ else(CGNS_LIBRARIES AND CGNS_INCLUDE_DIRS) + else() + + find_library(CGNS_LIBRARY +- NAMES cgns ++ NAMES cgnsdll cgns + PATH_SUFFIXES ${cgns_lib_suffixes}) + + endif() +diff --git a/packages/seacas/libraries/aprepro_lib/CMakeLists.txt b/packages/seacas/libraries/aprepro_lib/CMakeLists.txt +index ef391f1c6..a4869415b 100644 +--- a/packages/seacas/libraries/aprepro_lib/CMakeLists.txt ++++ b/packages/seacas/libraries/aprepro_lib/CMakeLists.txt +@@ -104,6 +104,10 @@ if (${CMAKE_PROJECT_NAME} STREQUAL "Seacas") + endif() + endif() + ++if(BUILD_SHARED_LIBS) ++ set_target_properties(aprepro_lib PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) ++endif() ++ + if (${PACKAGE_NAME}_ENABLE_TESTS) + TRIBITS_ADD_EXECUTABLE(aprepro_lib_test NOEXEPREFIX NOEXESUFFIX INSTALLABLE SOURCES apr_test.cc LINKER_LANGUAGE CXX) + +diff --git a/packages/seacas/libraries/chaco/CMakeLists.txt b/packages/seacas/libraries/chaco/CMakeLists.txt +index 5f43a4e0c..ff8570ce3 100644 +--- a/packages/seacas/libraries/chaco/CMakeLists.txt ++++ b/packages/seacas/libraries/chaco/CMakeLists.txt +@@ -56,5 +56,7 @@ TRIBITS_ADD_LIBRARY( + HEADERS ${HEADERS} + SOURCES ${SOURCES} + ) +- ++if(BUILD_SHARED_LIBS) ++ set_target_properties(chaco PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) ++endif() + TRIBITS_SUBPACKAGE_POSTPROCESS() +diff --git a/packages/seacas/libraries/exodus/CMakeLists.txt b/packages/seacas/libraries/exodus/CMakeLists.txt +index 2ed3ec4ab..f80f697f1 100644 +--- a/packages/seacas/libraries/exodus/CMakeLists.txt ++++ b/packages/seacas/libraries/exodus/CMakeLists.txt +@@ -13,6 +13,7 @@ FILE(GLOB SOURCES src/ex_*.c) + if (NOT ${PACKAGE_NAME}_HIDE_DEPRECATED_CODE) + FILE(GLOB DEP_SOURCES src/deprecated/ex_*.c) + endif() ++set(EXODUSII_BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}") + TRIBITS_CONFIGURE_FILE(exodus_config.h) + + if (NOT ${EXODUS_THREADSAFE}) +@@ -32,6 +33,9 @@ TRIBITS_ADD_LIBRARY( + HEADERS ${HEADERS} + SOURCES ${SOURCES} ${DEP_SOURCES} + ) ++if(BUILD_SHARED_LIBS) ++ target_compile_definitions(exodus PRIVATE exoIIc_EXPORTS) ++endif() + + set_property(TARGET exodus PROPERTY C_STANDARD 99) + +diff --git a/packages/seacas/libraries/exodus/cmake/exodus_config.h.in b/packages/seacas/libraries/exodus/cmake/exodus_config.h.in +index e4dcd51f2..a88254ab7 100644 +--- a/packages/seacas/libraries/exodus/cmake/exodus_config.h.in ++++ b/packages/seacas/libraries/exodus/cmake/exodus_config.h.in +@@ -4,4 +4,17 @@ + + @SEACAS_DEPRECATED_DECLARATIONS@ + ++#cmakedefine EXODUSII_BUILD_SHARED_LIBS ++#if defined(_WIN32) ++# if defined(EXODUSII_BUILD_SHARED_LIBS) ++# if defined(exoIIc_EXPORTS) ++# define EXODUS_EXPORT __declspec( dllexport ) extern ++# else ++# define EXODUS_EXPORT __declspec( dllimport ) extern ++# endif ++# endif ++#else ++# define EXODUS_EXPORT extern ++#endif ++ + #endif +diff --git a/packages/seacas/libraries/exodus/include/exodusII.h b/packages/seacas/libraries/exodus/include/exodusII.h +index ce636683a..5caa88f45 100644 +--- a/packages/seacas/libraries/exodus/include/exodusII.h ++++ b/packages/seacas/libraries/exodus/include/exodusII.h +@@ -715,7 +715,7 @@ ex_put_loadbal_param_cc(int exoid, /* NetCDF/Exodus file ID + ); + + /* Utility function to replace strncpy, strcpy -- guarantee null termination */ +-char *ex_copy_string(char *dest, char const *source, size_t elements); ++EXODUS_EXPORT char *ex_copy_string(char *dest, char const *source, size_t elements); + + /*! + * \addtogroup ModelDescription +diff --git a/packages/seacas/libraries/exodus/include/exodusII_int.h b/packages/seacas/libraries/exodus/include/exodusII_int.h +index cec2d7555..e2a21f8d4 100644 +--- a/packages/seacas/libraries/exodus/include/exodusII_int.h ++++ b/packages/seacas/libraries/exodus/include/exodusII_int.h +@@ -86,7 +86,7 @@ extern "C" { + #define EX_FILE_ID_MASK (0xffff0000) /**< Must match FILE_ID_MASK in NetCDF nc4internal.h */ + #define EX_GRP_ID_MASK (0x0000ffff) /**< Must match GRP_ID_MASK in NetCDF nc4internal.h */ + +-void ex__reset_error_status(void); ++EXODUS_EXPORT void ex__reset_error_status(void); + + #if defined(EXODUS_THREADSAFE) + #if !defined(exerrval) +@@ -791,9 +791,9 @@ extern struct ex__obj_stats *exoII_edm; + extern struct ex__obj_stats *exoII_fam; + extern struct ex__obj_stats *exoII_nm; + +-struct ex__file_item *ex__find_file_item(int exoid); +-struct ex__file_item *ex__add_file_item(int exoid); +-struct ex__obj_stats *ex__get_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr); ++EXODUS_EXPORT struct ex__file_item *ex__find_file_item(int exoid); ++EXODUS_EXPORT struct ex__file_item *ex__add_file_item(int exoid); ++EXODUS_EXPORT struct ex__obj_stats *ex__get_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr); + + EXODUS_EXPORT void ex__rm_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr); + +diff --git a/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.h b/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.h +index e7323b8ec..ec974dbc8 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.h ++++ b/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.h +@@ -81,7 +81,7 @@ namespace Ioss { + archive(m_bcName, m_famName, m_rangeBeg, m_rangeEnd, m_face); + } + +- friend std::ostream &operator<<(std::ostream &os, const BoundaryCondition &bc); ++ friend IOSS_EXPORT std::ostream &operator<<(std::ostream &os, const BoundaryCondition &bc); + + private: + bool equal_(const Ioss::BoundaryCondition &rhs, bool quiet) const; +diff --git a/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.h b/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.h +index 015cc51d3..97bec74b0 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.h ++++ b/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.h +@@ -86,7 +86,7 @@ namespace Ioss { + Ioss::IJK_t inverse_transform(const Ioss::IJK_t &index_1) const; + + std::vector<int> get_range(int ordinal) const; +- friend std::ostream &operator<<(std::ostream &os, const ZoneConnectivity &zgc); ++ friend IOSS_EXPORT std::ostream &operator<<(std::ostream &os, const ZoneConnectivity &zgc); + + /* COMPARE two ZoneConnectivity objects */ + bool operator==(const Ioss::ZoneConnectivity &rhs) const; +diff --git a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.C b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.C +index 872050daa..a3a0baf9f 100644 +--- a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.C ++++ b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.C +@@ -51,12 +51,6 @@ namespace Iotm { + initialize(); + } + +- TextMesh::TextMesh() +- { +- m_errorHandler = [](const std::ostringstream &errmsg) { error_handler(errmsg); }; +- initialize(); +- } +- + unsigned TextMesh::spatial_dimension() const { return m_data.spatialDim; } + + void TextMesh::initialize() +diff --git a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.h b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.h +index 530b51e62..73ea2a5c6 100644 +--- a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.h ++++ b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.h +@@ -58,7 +58,6 @@ namespace Iotm { + public: + explicit TextMesh(const std::string ¶meters, int proc_count = 1, int my_proc = 0); + TextMesh(int proc_count = 1, int my_proc = 0); +- TextMesh(); + TextMesh(const TextMesh &) = delete; + TextMesh &operator=(const TextMesh &) = delete; + +diff --git a/packages/seacas/libraries/nemesis/CMakeLists.txt b/packages/seacas/libraries/nemesis/CMakeLists.txt +index 154cf9e9e..ab5d87daa 100644 +--- a/packages/seacas/libraries/nemesis/CMakeLists.txt ++++ b/packages/seacas/libraries/nemesis/CMakeLists.txt +@@ -1,5 +1,5 @@ + TRIBITS_SUBPACKAGE(Nemesis) +- ++set(NEMESIS_BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}" CACHE BOOL "") + SET(NEMESIS_VERSION_MAJOR "5") + SET(NEMESIS_VERSION_MINOR "15") + SET(NEMESIS_VERSION_PATCH "0") +@@ -27,7 +27,7 @@ TRIBITS_ADD_LIBRARY( + HEADERS ${HEADERS} + SOURCES ${SOURCES} + ) +- ++target_compile_definitions(nemesis PRIVATE nemc_EXPORTS) + TRIBITS_ADD_EXECUTABLE_AND_TEST( + ne_ctest_wrap + NAME ne_ctest_wrap +diff --git a/packages/seacas/libraries/nemesis/ne_nemesisI.h b/packages/seacas/libraries/nemesis/ne_nemesisI.h +index dc78c2fe4..ae43c1f3f 100644 +--- a/packages/seacas/libraries/nemesis/ne_nemesisI.h ++++ b/packages/seacas/libraries/nemesis/ne_nemesisI.h +@@ -14,6 +14,8 @@ + #ifndef _NE_NEMESIS_H + #define _NE_NEMESIS_H + ++#include "nemesis_cfg.h" ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -34,24 +36,24 @@ typedef void void_int; + /*============================================================================= + * Initial Information Routines + *===========================================================================*/ +-extern int ne_get_init_info(int neid, /* NemesisI file ID */ ++NEMESIS_EXPORT int ne_get_init_info(int neid, /* NemesisI file ID */ + int * num_proc, /* Number of processors */ + int * num_proc_in_f, /* Number of procs in this file */ + char *ftype); + +-extern int ne_put_init_info(int neid, /* NemesisI file ID */ ++NEMESIS_EXPORT int ne_put_init_info(int neid, /* NemesisI file ID */ + int num_proc, /* Number of processors */ + int num_proc_in_f, /* Number of procs in this file */ + char *ftype); + +-extern int ne_get_init_global(int neid, /* NemesisI file ID */ ++NEMESIS_EXPORT int ne_get_init_global(int neid, /* NemesisI file ID */ + void_int *num_nodes_g, /* Number of global FEM nodes */ + void_int *num_elems_g, /* Number of global FEM elements */ + void_int *num_elem_blks_g, /* Number of global elem blocks */ + void_int *num_node_sets_g, /* Number of global node sets */ + void_int *num_side_sets_g /* Number of global side sets */ + ); +-extern int ne_put_init_global(int neid, /* NemesisI file ID */ ++NEMESIS_EXPORT int ne_put_init_global(int neid, /* NemesisI file ID */ + int64_t num_nodes_g, /* Number of global FEM nodes */ + int64_t num_elems_g, /* Number of global FEM elements */ + int64_t num_elem_blks_g, /* Number of global elem blocks */ +@@ -59,12 +61,12 @@ extern int ne_put_init_global(int neid, /* NemesisI file ID */ + int64_t num_side_sets_g /* Number of global side sets */ + ); + +-extern int ne_put_version(int neid); ++NEMESIS_EXPORT int ne_put_version(int neid); + + /*============================================================================= + * Loadbalance Parameter Routines + *===========================================================================*/ +-extern int ne_get_loadbal_param(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_loadbal_param(int neid, /* NetCDF/Exodus file ID */ + void_int *num_int_nodes, /* Number of internal FEM nodes */ + void_int *num_bor_nodes, /* Number of border FEM nodes */ + void_int *num_ext_nodes, /* Number of external FEM nodes */ +@@ -75,7 +77,7 @@ extern int ne_get_loadbal_param(int neid, /* NetCDF/Exodus file + int processor /* Processor ID */ + ); + +-extern int ne_put_loadbal_param(int neid, /* NemesisI file ID */ ++NEMESIS_EXPORT int ne_put_loadbal_param(int neid, /* NemesisI file ID */ + int64_t num_int_nodes, /* Number of internal FEM nodes */ + int64_t num_bor_nodes, /* Number of border FEM nodes */ + int64_t num_ext_nodes, /* Number of external FEM nodes */ +@@ -86,7 +88,7 @@ extern int ne_put_loadbal_param(int neid, /* NemesisI file ID */ + int processor /* Processor ID */ + ); + +-extern int ne_put_loadbal_param_cc(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_loadbal_param_cc(int neid, /* NetCDF/Exodus file ID */ + void_int *num_int_nodes, /* Number of internal node IDs */ + void_int *num_bor_nodes, /* Number of border node IDs */ + void_int *num_ext_nodes, /* Number of external node IDs */ +@@ -99,26 +101,26 @@ extern int ne_put_loadbal_param_cc(int neid, /* NetCDF/Exodus fi + /*============================================================================= + * NS, SS & EB Global Parameter Routines + *===========================================================================*/ +-extern int ne_get_ns_param_global(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_ns_param_global(int neid, /* NetCDF/Exodus file ID */ + void_int *ns_ids_glob, /* Global IDs of node sets */ + void_int *ns_n_cnt_glob, /* Count of nodes in node sets */ + void_int *ns_df_cnt_glob /* Count of dist. factors in ns */ + ); + +-extern int ++NEMESIS_EXPORT int + ne_put_ns_param_global(int neid, /* NemesisI file ID */ + void_int *global_ids, /* Vector of global node-set IDs */ + void_int *global_n_cnts, /* Vector of node counts in node-sets */ + void_int *global_df_cnts /* Vector of dist factor counts in node-sets */ + ); + +-extern int ne_get_ss_param_global(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_ss_param_global(int neid, /* NetCDF/Exodus file ID */ + void_int *ss_ids_glob, /* Global side-set IDs */ + void_int *ss_s_cnt_glob, /* Global side count */ + void_int *ss_df_cnt_glob /* Global dist. factor count */ + ); + +-extern int ne_put_ss_param_global(int neid, /* NemesisI file ID */ ++NEMESIS_EXPORT int ne_put_ss_param_global(int neid, /* NemesisI file ID */ + void_int *global_ids, /* Vector of global side-set IDs */ + void_int *global_el_cnts, /* Vector of element/side */ + /* counts in each side set */ +@@ -126,12 +128,12 @@ extern int ne_put_ss_param_global(int neid, /* NemesisI file ID + /* counts in each side set */ + ); + +-extern int ne_get_eb_info_global(int neid, /* NemesisI file ID */ ++NEMESIS_EXPORT int ne_get_eb_info_global(int neid, /* NemesisI file ID */ + void_int *el_blk_ids, /* Vector of global element IDs */ + void_int *el_blk_cnts /* Vector of global element counts */ + ); + +-extern int ne_put_eb_info_global(int neid, /* NemesisI file ID */ ++NEMESIS_EXPORT int ne_put_eb_info_global(int neid, /* NemesisI file ID */ + void_int *el_blk_ids, /* Vector of global element IDs */ + void_int *el_blk_cnts /* Vector of global element counts */ + ); +@@ -139,7 +141,7 @@ extern int ne_put_eb_info_global(int neid, /* NemesisI file ID */ + /*============================================================================= + * NS, SS & EB Subset Routines + *===========================================================================*/ +-extern int ne_get_n_side_set(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_side_set(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id side_set_id, /* Side-set ID to read */ + int64_t start_side_num, /* Starting element number */ + int64_t num_sides, /* Number of sides to read */ +@@ -147,7 +149,7 @@ extern int ne_get_n_side_set(int neid, /* NetCDF/Exodus f + void_int * side_set_side_list /* List of side IDs */ + ); + +-extern int ne_put_n_side_set(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_n_side_set(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id side_set_id, /* Side-set ID to write */ + int64_t start_side_num, /* Starting element number */ + int64_t num_sides, /* Number of sides to write */ +@@ -155,49 +157,49 @@ extern int ne_put_n_side_set(int neid, /* NetCDF/Exodu + const void_int *side_set_side_list /* List of side IDs */ + ); + +-extern int ne_get_n_side_set_df(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_side_set_df(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id side_set_id, /* Side-set ID */ + int64_t start_num, /* Starting df number */ + int64_t num_df_to_get, /* Number of df's to read */ + void * side_set_df /* Distribution factors */ + ); + +-extern int ne_put_n_side_set_df(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_n_side_set_df(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id side_set_id, /* Side-set ID */ + int64_t start_num, /* Starting df number */ + int64_t num_df_to_get, /* Number of df's to write */ + void * side_set_df /* Distribution factors */ + ); + +-extern int ne_get_n_node_set(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_node_set(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id node_set_id, /* Node set ID */ + int64_t start_node_num, /* Node index to start reading at */ + int64_t num_node, /* Number of nodes to read */ + void_int * node_set_node_list /* List of nodes in node set */ + ); + +-extern int ne_put_n_node_set(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_n_node_set(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id node_set_id, /* Node set ID */ + int64_t start_node_num, /* Node index to start writing at */ + int64_t num_node, /* Number of nodes to write */ + const void_int *node_set_node_list /* List of nodes in node set */ + ); + +-extern int ne_get_n_node_set_df(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_node_set_df(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id node_set_id, /* Node-set ID */ + int64_t start_num, /* Starting df number */ + int64_t num_df_to_get, /* Number of df's to read */ + void * node_set_df /* Distribution factors */ + ); + +-extern int ne_put_n_node_set_df(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_n_node_set_df(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id node_set_id, /* Node-set ID */ + int64_t start_num, /* Starting df number */ + int64_t num_df_to_get, /* Number of df's to write */ + void * node_set_df /* Distribution factors */ + ); + +-extern int ne_get_n_coord(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_coord(int neid, /* NetCDF/Exodus file ID */ + int64_t start_node_num, /* Starting position to read from */ + int64_t num_nodes, /* Number of coords to read */ + void * x_coor, /* Vector of X coordinates */ +@@ -205,7 +207,7 @@ extern int ne_get_n_coord(int neid, /* NetCDF/Exodus file ID */ + void * z_coor /* Vector of Z coordinates */ + ); + +-extern int ne_put_n_coord(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_n_coord(int neid, /* NetCDF/Exodus file ID */ + int64_t start_node_num, /* Starting position to write to */ + int64_t num_nodes, /* Number of coords to write */ + void * x_coor, /* Vector of X coordinates */ +@@ -213,35 +215,35 @@ extern int ne_put_n_coord(int neid, /* NetCDF/Exodus file ID */ + void * z_coor /* Vector of Z coordinates */ + ); + +-extern int ne_get_n_elem_conn(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_elem_conn(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id elem_blk_id, /* Element block ID */ + int64_t start_elem_num, /* Starting position to read from */ + int64_t num_elems, /* Number of elements to read */ + void_int * connect /* Connectivity vector */ + ); + +-extern int ne_put_n_elem_conn(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_n_elem_conn(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id elem_blk_id, /* Element block ID */ + int64_t start_elem_num, /* Starting position to write to */ + int64_t num_elems, /* Number of elements to write */ + const void_int *connect /* Connectivity vector */ + ); + +-extern int ne_get_n_elem_attr(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_elem_attr(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id elem_blk_id, /* Element block ID */ + int64_t start_elem_num, /* Starting position to read from */ + int64_t num_elems, /* Number of elements to read */ + void * attrib /* Attribute */ + ); + +-extern int ne_put_n_elem_attr(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_n_elem_attr(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id elem_blk_id, /* Element block ID */ + int64_t start_elem_num, /* Starting position to write to */ + int64_t num_elems, /* Number of elements to write */ + void * attrib /* Attribute */ + ); + +-extern int ne_get_elem_type(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_elem_type(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id elem_blk_id, /* Element block ID */ + char * elem_type /* The name of the element type */ + ); +@@ -249,7 +251,7 @@ extern int ne_get_elem_type(int neid, /* NetCDF/Exodus file ID * + /*============================================================================= + * Variable Routines + *===========================================================================*/ +-extern int ne_get_n_elem_var(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_elem_var(int neid, /* NetCDF/Exodus file ID */ + int time_step, /* time index */ + int elem_var_index, /* elemental variable index */ + ex_entity_id elem_blk_id, /* elemental block id */ +@@ -259,7 +261,7 @@ extern int ne_get_n_elem_var(int neid, /* NetCDF/Exodus fi + void * elem_var_vals /* variable values */ + ); + +-extern int ne_put_elem_var_slab(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_elem_var_slab(int neid, /* NetCDF/Exodus file ID */ + int time_step, /* time index */ + int elem_var_index, /* elemental variable index */ + ex_entity_id elem_blk_id, /* elemental block id */ +@@ -268,7 +270,7 @@ extern int ne_put_elem_var_slab(int neid, /* NetCDF/Exodus fi + void * elem_var_vals /* variable values */ + ); + +-extern int ne_get_n_nodal_var(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_nodal_var(int neid, /* NetCDF/Exodus file ID */ + int time_step, /* whole time step number */ + int nodal_var_index, /* index of desired nodal var */ + int64_t start_node_num, /* starting node number */ +@@ -276,7 +278,7 @@ extern int ne_get_n_nodal_var(int neid, /* NetCDF/Exodus file ID + void * nodal_vars /* array of nodal var values */ + ); + +-extern int ne_put_nodal_var_slab(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_nodal_var_slab(int neid, /* NetCDF/Exodus file ID */ + int time_step, /* The time step index */ + int nodal_var_index, /* Nodal variable index */ + int64_t start_pos, /* Start position for write */ +@@ -287,51 +289,51 @@ extern int ne_put_nodal_var_slab(int neid, /* NetCDF/Exodus file + /*============================================================================= + * Number Map Routines + *===========================================================================*/ +-extern int ne_get_n_elem_num_map(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_elem_num_map(int neid, /* NetCDF/Exodus file ID */ + int64_t start_ent, /* Starting position to read from */ + int64_t num_ents, /* Number of elements to read */ + void_int *elem_map /* element map numbers */ + ); + +-extern int ne_put_n_elem_num_map(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_n_elem_num_map(int neid, /* NetCDF/Exodus file ID */ + int64_t start_ent, /* Starting position to read from */ + int64_t num_ents, /* Number of elements to read */ + const void_int *elem_map /* element map numbers */ + ); + +-extern int ne_get_n_node_num_map(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_n_node_num_map(int neid, /* NetCDF/Exodus file ID */ + int64_t start_ent, /* starting node number */ + int64_t num_ents, /* number of nodes to read */ + void_int *node_map /* vector for node map */ + ); + +-extern int ne_put_n_node_num_map(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_n_node_num_map(int neid, /* NetCDF/Exodus file ID */ + int64_t start_ent, /* starting node number */ + int64_t num_ents, /* number of nodes to read */ + const void_int *node_map /* vector for node map */ + ); + +-extern int ne_get_node_map(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_node_map(int neid, /* NetCDF/Exodus file ID */ + void_int *node_mapi, /* Internal FEM node IDs */ + void_int *node_mapb, /* Border FEM node IDs */ + void_int *node_mape, /* External FEM node IDs */ + int processor /* Processor IDs */ + ); + +-extern int ne_put_node_map(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_node_map(int neid, /* NetCDF/Exodus file ID */ + void_int *node_mapi, /* Internal FEM node IDs */ + void_int *node_mapb, /* Border FEM node IDs */ + void_int *node_mape, /* External FEM node IDs */ + int processor /* This processor ID */ + ); + +-extern int ne_get_elem_map(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_elem_map(int neid, /* NetCDF/Exodus file ID */ + void_int *elem_mapi, /* Internal element IDs */ + void_int *elem_mapb, /* Border element IDs */ + int processor /* Processor ID */ + ); + +-extern int ne_put_elem_map(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_elem_map(int neid, /* NetCDF/Exodus file ID */ + void_int *elem_mapi, /* Internal FEM element IDs */ + void_int *elem_mapb, /* Border FEM element IDs */ + int processor /* This processor ID */ +@@ -341,7 +343,7 @@ extern int ne_put_elem_map(int neid, /* NetCDF/Exodus file ID */ + * Communications Maps Routines + *===========================================================================*/ + +-extern int ne_get_cmap_params(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_cmap_params(int neid, /* NetCDF/Exodus file ID */ + void_int *node_cmap_ids, /* Nodal comm. map IDs */ + void_int *node_cmap_node_cnts, /* Number of nodes in each map */ + void_int *elem_cmap_ids, /* Elemental comm. map IDs */ +@@ -349,7 +351,7 @@ extern int ne_get_cmap_params(int neid, /* NetCDF/Exodus fi + int processor /* This processor ID */ + ); + +-extern int ne_put_cmap_params(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_cmap_params(int neid, /* NetCDF/Exodus file ID */ + void_int *node_map_ids, /* Node map IDs */ + void_int *node_map_node_cnts, /* Nodes in nodal comm */ + void_int *elem_map_ids, /* Elem map IDs */ +@@ -357,7 +359,7 @@ extern int ne_put_cmap_params(int neid, /* NetCDF/Exodus fil + int64_t processor /* This processor ID */ + ); + +-extern int ne_put_cmap_params_cc(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_cmap_params_cc(int neid, /* NetCDF/Exodus file ID */ + void_int *node_map_ids, /* Node map IDs */ + void_int *node_map_node_cnts, /* Nodes in nodal comm */ + void_int *node_proc_ptrs, /* Pointer into array for */ +@@ -368,21 +370,21 @@ extern int ne_put_cmap_params_cc(int neid, /* NetCDF/Exodus + /* elem maps */ + ); + +-extern int ne_get_node_cmap(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_node_cmap(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id map_id, /* Map ID */ + void_int * node_ids, /* FEM node IDs */ + void_int * proc_ids, /* Processor IDs */ + int processor /* This processor ID */ + ); + +-extern int ne_put_node_cmap(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_node_cmap(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id map_id, /* Nodal comm map ID */ + void_int * node_ids, /* FEM node IDs */ + void_int * proc_ids, /* Processor IDs */ + int processor /* This processor ID */ + ); + +-extern int ne_get_elem_cmap(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_get_elem_cmap(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id map_id, /* Elemental comm map ID */ + void_int * elem_ids, /* Element IDs */ + void_int * side_ids, /* Element side IDs */ +@@ -390,7 +392,7 @@ extern int ne_get_elem_cmap(int neid, /* NetCDF/Exodus file ID */ + int processor /* This processor ID */ + ); + +-extern int ne_put_elem_cmap(int neid, /* NetCDF/Exodus file ID */ ++NEMESIS_EXPORT int ne_put_elem_cmap(int neid, /* NetCDF/Exodus file ID */ + ex_entity_id map_id, /* Elemental comm map ID */ + void_int * elem_ids, /* Vector of element IDs */ + void_int * side_ids, /* Vector of side IDs */ +diff --git a/packages/seacas/libraries/nemesis/nemesis_cfg.h.in b/packages/seacas/libraries/nemesis/nemesis_cfg.h.in +index 37b04f5cd..05f2db341 100644 +--- a/packages/seacas/libraries/nemesis/nemesis_cfg.h.in ++++ b/packages/seacas/libraries/nemesis/nemesis_cfg.h.in +@@ -1,8 +1,8 @@ +-# Copyright(C) 1999-2020 National Technology & Engineering Solutions +-# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with +-# NTESS, the U.S. Government retains certain rights in this software. +-# +-# See packages/seacas/LICENSE for details ++// Copyright(C) 1999-2020 National Technology & Engineering Solutions ++// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with ++// NTESS, the U.S. Government retains certain rights in this software. ++// ++// See packages/seacas/LICENSE for details + + #ifndef __nemesis_cfg_h + #define __nemesis_cfg_h +diff --git a/packages/seacas/libraries/suplib_c/CMakeLists.txt b/packages/seacas/libraries/suplib_c/CMakeLists.txt +index c5c0d0fd3..b047ea4cd 100644 +--- a/packages/seacas/libraries/suplib_c/CMakeLists.txt ++++ b/packages/seacas/libraries/suplib_c/CMakeLists.txt +@@ -29,5 +29,7 @@ TRIBITS_ADD_LIBRARY( + NOINSTALLHEADERS + SOURCES ${SOURCES} + ) +- ++if(BUILD_SHARED_LIBS) ++ set_target_properties(suplib_c PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) ++endif() + TRIBITS_SUBPACKAGE_POSTPROCESS() +diff --git a/packages/seacas/libraries/suplib_cpp/CMakeLists.txt b/packages/seacas/libraries/suplib_cpp/CMakeLists.txt +index 5eb15b5a7..640b2a8b9 100644 +--- a/packages/seacas/libraries/suplib_cpp/CMakeLists.txt ++++ b/packages/seacas/libraries/suplib_cpp/CMakeLists.txt +@@ -30,5 +30,7 @@ TRIBITS_ADD_LIBRARY( + NOINSTALLHEADERS + SOURCES ${SOURCES} + ) +- ++if(BUILD_SHARED_LIBS) ++ set_target_properties(suplib_cpp PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) ++endif() + TRIBITS_SUBPACKAGE_POSTPROCESS() diff --git a/vcpkg/ports/seacas/fix-build-error-with-fmt11.patch b/vcpkg/ports/seacas/fix-build-error-with-fmt11.patch new file mode 100644 index 0000000..470626c --- /dev/null +++ b/vcpkg/ports/seacas/fix-build-error-with-fmt11.patch @@ -0,0 +1,108 @@ +diff --git a/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C b/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C +index fa2719a..0a7cfff 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C ++++ b/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C +@@ -14,6 +14,7 @@ + #include <algorithm> + #include <cassert> + #include <fmt/ostream.h> ++#include <fmt/ranges.h> + #include <numeric> + + #if !defined(NO_ZOLTAN_SUPPORT) +diff --git a/packages/seacas/libraries/ioss/src/Ioss_IOFactory.C b/packages/seacas/libraries/ioss/src/Ioss_IOFactory.C +index ef20a45..faa7943 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_IOFactory.C ++++ b/packages/seacas/libraries/ioss/src/Ioss_IOFactory.C +@@ -11,6 +11,7 @@ + #include <Ioss_Version.h> + #include <cstddef> // for nullptr + #include <fmt/ostream.h> ++#include <fmt/ranges.h> + #include <map> // for _Rb_tree_iterator, etc + #include <ostream> // for basic_ostream, etc + #include <set> +diff --git a/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.C b/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.C +index 488d28a..0a1e5e2 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.C ++++ b/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.C +@@ -14,6 +14,7 @@ + #include <Ioss_SmartAssert.h> + #include <Ioss_StructuredBlock.h> + #include <fmt/ostream.h> ++#include <fmt/ranges.h> + + #include <cstddef> // for size_t + #include <numeric> +diff --git a/packages/seacas/libraries/ioss/src/Ioss_Utils.C b/packages/seacas/libraries/ioss/src/Ioss_Utils.C +index 241ff80..d234b8b 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_Utils.C ++++ b/packages/seacas/libraries/ioss/src/Ioss_Utils.C +@@ -20,6 +20,7 @@ + #include <fmt/chrono.h> + #include <fmt/format.h> + #include <fmt/ostream.h> ++#include <fmt/ranges.h> + #include <fstream> + #include <sstream> + #include <string> +diff --git a/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.C b/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.C +index 6888e17..f53c5e5 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.C ++++ b/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.C +@@ -8,6 +8,7 @@ + #include <Ioss_ZoneConnectivity.h> + #include <cstddef> // for size_t + #include <fmt/ostream.h> ++#include <fmt/ranges.h> + #include <string> // for string + #include <vector> // for vector + +diff --git a/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h b/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h +index c486d69..b67a5c6 100644 +--- a/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h ++++ b/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h +@@ -9,6 +9,7 @@ + #include "iohb_export.h" + + #include <fmt/ostream.h> ++#include <fmt/ranges.h> + #include <sstream> + #include <string> + #include <vector> +diff --git a/packages/seacas/libraries/ioss/src/main/io_info.C b/packages/seacas/libraries/ioss/src/main/io_info.C +index 53a162b..bcadb55 100644 +--- a/packages/seacas/libraries/ioss/src/main/io_info.C ++++ b/packages/seacas/libraries/ioss/src/main/io_info.C +@@ -11,6 +11,7 @@ + #define FMT_DEPRECATED_OSTREAM + #include <fmt/format.h> + #include <fmt/ostream.h> ++#include <fmt/ranges.h> + #if defined(SEACAS_HAVE_CGNS) + #include <cgnslib.h> + #endif +diff --git a/packages/seacas/libraries/ioss/src/main/io_modify.C b/packages/seacas/libraries/ioss/src/main/io_modify.C +index 50a217d..c01191b 100644 +--- a/packages/seacas/libraries/ioss/src/main/io_modify.C ++++ b/packages/seacas/libraries/ioss/src/main/io_modify.C +@@ -58,6 +58,7 @@ + #include <fmt/color.h> + #include <fmt/format.h> + #include <fmt/ostream.h> ++#include <fmt/ranges.h> + + #if defined(SEACAS_HAVE_EXODUS) + #include <exodus/Ioex_Internals.h> +diff --git a/packages/seacas/libraries/ioss/src/main/sphgen.C b/packages/seacas/libraries/ioss/src/main/sphgen.C +index f633d55..24c2e2f 100644 +--- a/packages/seacas/libraries/ioss/src/main/sphgen.C ++++ b/packages/seacas/libraries/ioss/src/main/sphgen.C +@@ -14,6 +14,7 @@ + #include <cstdlib> + #include <cstring> + #include <fmt/ostream.h> ++#include <fmt/ranges.h> + #include <iostream> + #include <string> + #include <vector> diff --git a/vcpkg/ports/seacas/fix-fmt-10.patch b/vcpkg/ports/seacas/fix-fmt-10.patch new file mode 100644 index 0000000..e562335 --- /dev/null +++ b/vcpkg/ports/seacas/fix-fmt-10.patch @@ -0,0 +1,28 @@ +From 5a576de57ee1664d845c83f552f2100cc9303a26 Mon Sep 17 00:00:00 2001 +From: Greg Sjaardema <gsjaardema@gmail.com> +Date: Wed, 10 May 2023 15:28:53 -0600 +Subject: [PATCH] IOSS: Fix enum printing to work with fmt-10 + +--- + .../seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.C | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.C b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.C +index b6827aa177..59507085fc 100644 +--- a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.C ++++ b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.C +@@ -1,4 +1,4 @@ +-// Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions ++// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions + // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + // NTESS, the U.S. Government retains certain rights in this software. + // +@@ -802,7 +802,7 @@ namespace Iotm { + std::ostringstream errmsg; + fmt::print(errmsg, + "Error: Failed to find entity of type {} with name {} for Assembly {}.\n", +- type, members[j], assem->name()); ++ Ioss::Utils::entity_type_to_string(type), members[j], assem->name()); + IOSS_ERROR(errmsg); + } + } diff --git a/vcpkg/ports/seacas/fix-headers.patch b/vcpkg/ports/seacas/fix-headers.patch new file mode 100644 index 0000000..35abbac --- /dev/null +++ b/vcpkg/ports/seacas/fix-headers.patch @@ -0,0 +1,13 @@ +diff --git a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMeshFuncs.h b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMeshFuncs.h
+index 67512ba..589cac2 100644
+--- a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMeshFuncs.h
++++ b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMeshFuncs.h
+@@ -6,7 +6,7 @@
+
+ // ####################### Start Clang Header Tool Managed Headers ########################
+ // clang-format off
+-#include <ctype.h> // for toupper
++#include <cctype> // for toupper, isspace, isdigit
+ #include <stddef.h> // for size_t
+ #include <algorithm> // for remove, etc
+ #include <iterator> // for insert_iterator
diff --git a/vcpkg/ports/seacas/fix-ioss-includes.patch b/vcpkg/ports/seacas/fix-ioss-includes.patch new file mode 100644 index 0000000..941cd6f --- /dev/null +++ b/vcpkg/ports/seacas/fix-ioss-includes.patch @@ -0,0 +1,25 @@ +diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.C b/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.C
+index eab77e9a1..6cec47422 100644
+--- a/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.C
++++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.C
+@@ -14,6 +14,8 @@
+ #include <Ioss_SmartAssert.h>
+ #include <Ioss_Sort.h>
+ #include <Ioss_Utils.h>
++#include <Ioss_Decomposition.h>
++#include <Ioss_ParallelUtils.h>
+ #include <exodus/Ioex_Utils.h>
+
+ #include <algorithm> // for lower_bound, copy, etc
+diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.C b/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.C
+index 0be442435..fccf2d4d4 100644
+--- a/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.C
++++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.C
+@@ -74,6 +74,7 @@
+ #include <Ioss_SurfaceSplit.h>
+ #include <Ioss_Utils.h>
+ #include <Ioss_VariableType.h>
++#include <Ioss_SerializeIO.h>
+
+ #include <Ioss_FileInfo.h>
+ #undef MPICPP
diff --git a/vcpkg/ports/seacas/fix-mpi.patch b/vcpkg/ports/seacas/fix-mpi.patch new file mode 100644 index 0000000..32c4a99 --- /dev/null +++ b/vcpkg/ports/seacas/fix-mpi.patch @@ -0,0 +1,85 @@ +diff --git a/cmake/TPLs/FindTPLParMETIS.cmake b/cmake/TPLs/FindTPLParMETIS.cmake +index 2dc2c149d..9bc04ae82 100644 +--- a/cmake/TPLs/FindTPLParMETIS.cmake ++++ b/cmake/TPLs/FindTPLParMETIS.cmake +@@ -54,7 +54,8 @@ + # @HEADER + + +-TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( ParMETIS +- REQUIRED_HEADERS parmetis.h +- REQUIRED_LIBS_NAMES "parmetis;metis" +- ) ++find_package(parmetis REQUIRED) ++tribits_extpkg_create_imported_all_libs_target_and_config_file( ++ ParMETIS ++ INNER_FIND_PACKAGE_NAME parmetis ++ IMPORTED_TARGETS_FOR_ALL_LIBS parmetis ) +diff --git a/packages/seacas/libraries/ioss/src/Ioss_Decomposition.h b/packages/seacas/libraries/ioss/src/Ioss_Decomposition.h +index f53f140a7..c2df7a802 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_Decomposition.h ++++ b/packages/seacas/libraries/ioss/src/Ioss_Decomposition.h +@@ -91,6 +91,8 @@ namespace Ioss { + SetDecompositionData() = default; + SetDecompositionData(const SetDecompositionData &) = delete; + SetDecompositionData(SetDecompositionData &&) = default; ++ SetDecompositionData &operator =(const SetDecompositionData &) = delete; ++ SetDecompositionData &operator =(SetDecompositionData &&) = default; + + ~SetDecompositionData() + { +diff --git a/packages/seacas/libraries/ioss/src/Ioss_ParallelUtils.C b/packages/seacas/libraries/ioss/src/Ioss_ParallelUtils.C +index a82d6ca14..c5e80f692 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_ParallelUtils.C ++++ b/packages/seacas/libraries/ioss/src/Ioss_ParallelUtils.C +@@ -419,7 +419,7 @@ template IOSS_EXPORT void Ioss::ParallelUtils::broadcast(int &value, int) const; + /// \relates Ioss::ParallelUtils::broadcast + template IOSS_EXPORT void Ioss::ParallelUtils::broadcast(int64_t &value, int) const; + +-template <> void Ioss::ParallelUtils::broadcast(std::string &my_str, int root) const ++template <> IOSS_EXPORT void Ioss::ParallelUtils::broadcast(std::string &my_str, int root) const + { + PAR_UNUSED(my_str); + PAR_UNUSED(root); +diff --git a/packages/seacas/libraries/ioss/src/Ioss_ScopeGuard.h b/packages/seacas/libraries/ioss/src/Ioss_ScopeGuard.h +index cfdad81d9..1a785161e 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_ScopeGuard.h ++++ b/packages/seacas/libraries/ioss/src/Ioss_ScopeGuard.h +@@ -27,7 +27,7 @@ public: + + template <class T> inline RefHolder<T> ByRef(T &t) { return RefHolder<T>(t); } + +-class IOSS_EXPORT ScopeGuardImplBase ++class ScopeGuardImplBase + { + ScopeGuardImplBase &operator=(const ScopeGuardImplBase &) = delete; + +diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.h b/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.h +index 359c1e9fd..e4c2dff9e 100644 +--- a/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.h ++++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.h +@@ -34,7 +34,11 @@ namespace Ioex { + class IOEX_EXPORT DecompositionDataBase + { + public: +- DecompositionDataBase(Ioss_MPI_Comm comm) : comm_(comm) {} ++ explicit DecompositionDataBase(Ioss_MPI_Comm comm) : comm_(comm) {}; ++ DecompositionDataBase(const DecompositionDataBase &) = delete; ++ DecompositionDataBase(DecompositionDataBase &&) = delete; ++ DecompositionDataBase &operator =(const DecompositionDataBase &) = delete; ++ DecompositionDataBase &operator =(DecompositionDataBase &&) = delete; + + virtual ~DecompositionDataBase() = default; + virtual int int_size() const = 0; +diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.h b/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.h +index f2785e37f..df0c8fbf6 100644 +--- a/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.h ++++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.h +@@ -16,6 +16,7 @@ + #include <Ioss_Map.h> // for Map + #include <Ioss_State.h> // for State + #include <exodus/Ioex_BaseDatabaseIO.h> // for DatabaseIO ++#include <exodus/Ioex_DecompositionData.h> + #include <functional> // for less + #include <map> // for map, map<>::value_compare + #include <memory> diff --git a/vcpkg/ports/seacas/fix_tpl_libs.patch b/vcpkg/ports/seacas/fix_tpl_libs.patch new file mode 100644 index 0000000..c042765 --- /dev/null +++ b/vcpkg/ports/seacas/fix_tpl_libs.patch @@ -0,0 +1,288 @@ +diff --git a/cmake/tribits/core/package_arch/TribitsAddExecutable.cmake b/cmake/tribits/core/package_arch/TribitsAddExecutable.cmake +index f08e7b78b..1274e8fce 100644 +--- a/cmake/tribits/core/package_arch/TribitsAddExecutable.cmake ++++ b/cmake/tribits/core/package_arch/TribitsAddExecutable.cmake +@@ -419,7 +419,11 @@ function(tribits_add_executable EXE_NAME) + foreach(depPkg IN LISTS ${PACKAGE_NAME}_LIB_ENABLED_DEPENDENCIES + ${PACKAGE_NAME}_TEST_ENABLED_DEPENDENCIES + ) +- target_link_libraries(${EXE_BINARY_NAME} PUBLIC ${depPkg}::all_libs) ++ if(TARGET TPL::${depPkg}::all_libs) ++ target_link_libraries(${EXE_BINARY_NAME} PUBLIC TPL::${depPkg}::all_libs) ++ else() ++ target_link_libraries(${EXE_BINARY_NAME} PUBLIC ${depPkg}::all_libs) ++ endif() + endforeach() + foreach(testOnlyLib ${PARSE_TESTONLYLIBS}) + target_link_libraries(${EXE_BINARY_NAME} PUBLIC +diff --git a/cmake/tribits/core/package_arch/TribitsAddLibrary.cmake b/cmake/tribits/core/package_arch/TribitsAddLibrary.cmake +index 4bac9f943..398002e33 100644 +--- a/cmake/tribits/core/package_arch/TribitsAddLibrary.cmake ++++ b/cmake/tribits/core/package_arch/TribitsAddLibrary.cmake +@@ -468,7 +468,11 @@ function(tribits_add_library LIBRARY_NAME_IN) + target_link_libraries(${LIBRARY_NAME} PUBLIC ${${PACKAGE_NAME}_LIBRARIES}) + # ${PACKAGE_NAME}_LIB_ENABLED_DEPENDENCIES + foreach(depPkg IN LISTS ${PACKAGE_NAME}_LIB_ENABLED_DEPENDENCIES) +- target_link_libraries(${LIBRARY_NAME} PUBLIC ${depPkg}::all_libs) ++ if(TARGET TPL::${depPkg}::all_libs) ++ target_link_libraries(${LIBRARY_NAME} PUBLIC TPL::${depPkg}::all_libs) ++ else() ++ target_link_libraries(${LIBRARY_NAME} PUBLIC ${depPkg}::all_libs) ++ endif() + endforeach() + # ${PACKAGE_NAME}_TEST_ENABLED_DEPENDENCIES (TESTONLY lib) + if (PARSE_TESTONLY) +diff --git a/cmake/tribits/core/package_arch/TribitsExternalPackageWriteConfigFile.cmake b/cmake/tribits/core/package_arch/TribitsExternalPackageWriteConfigFile.cmake +index 2d041a2ca..c49a2c019 100644 +--- a/cmake/tribits/core/package_arch/TribitsExternalPackageWriteConfigFile.cmake ++++ b/cmake/tribits/core/package_arch/TribitsExternalPackageWriteConfigFile.cmake +@@ -132,7 +132,7 @@ endfunction() + function(tribits_extpkg_install_config_file tplName tplConfigFile) + install( + FILES "${tplConfigFile}" +- DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/external_packages/${tplName}" ++ DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/external_packages/TPL-Seacas-${tplName}" + ) + endfunction() + +@@ -159,7 +159,7 @@ function(tribits_extpkg_install_config_version_file tplName + ) + install( + FILES "${tplConfigVersionFile}" +- DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/external_packages/${tplName}" ++ DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/external_packages/TPL-Seacas-${tplName}" + ) + endfunction() + +@@ -258,7 +258,7 @@ function(tribits_extpkg_write_config_file_str tplName tplConfigFileStrOut) + "# Generated by CMake, do not edit!\n" + "\n" + "# Guard against multiple inclusion\n" +- "if (TARGET ${tplName}::all_libs)\n" ++ "if (TARGET TPL::${tplName}::all_libs)\n" + " return()\n" + "endif()\n" + "\n" +@@ -333,9 +333,9 @@ function(tribits_extpkg_add_find_upstream_dependencies_str + message(FATAL_ERROR "ERROR: ${upstreamTplDepName}_DIR is empty!") + endif() + string(APPEND configFileFragStr +- "if (NOT TARGET ${upstreamTplDepName}::all_libs)\n" ++ "if (NOT TARGET TPL::${upstreamTplDepName}::all_libs)\n" + " set(${upstreamTplDepName}_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../${upstreamTplDepName}\")\n" +- " find_dependency(${upstreamTplDepName} REQUIRED CONFIG \${${tplName}_SearchNoOtherPathsArgs})\n" ++ " find_dependency(TPL-Seacas-${upstreamTplDepName} REQUIRED CONFIG \${${tplName}_SearchNoOtherPathsArgs})\n" + " unset(${upstreamTplDepName}_DIR)\n" + "endif()\n" + "\n" +@@ -440,6 +440,7 @@ function(tribits_extpkg_process_libraries_list tplName) + elseif (libEntryType STREQUAL "GENERAL_LINK_OPTION") + message_wrapper("-- NOTE: Moving the general link argument '${libentry}' in TPL_${tplName}_LIBRARIES forward on the link line which may change the link and break the link!") + list(APPEND libLinkFlagsList "${libentry}") ++ elseif(libEntryType STREQUAL "TARGET_NAME") + else() + tribits_extpkg_process_libraries_list_library_entry( + ${tplName} "${libentry}" ${libEntryType} libTargets lastLibProcessed +@@ -501,6 +501,8 @@ function(tribits_tpl_libraries_entry_type libentry libEntryTypeOut) + set(libEntryType FULL_LIB_PATH) + elseif (libentry MATCHES "^[a-zA-Z_][a-zA-Z0-9_-]*$") + set(libEntryType LIB_NAME) ++ elseif (TARGET "${libentry}") ++ set(libEntryType TARGET_NAME) + else() + set(libEntryType UNSUPPORTED_LIB_ENTRY) + endif() +@@ -529,7 +531,7 @@ function(tribits_extpkg_process_libraries_list_library_entry + tribits_extpkg_get_libname_and_path_from_libentry( + "${libentry}" ${libEntryType} libname libpath) + # Create IMPORTED library target +- set(prefixed_libname "${tplName}::${libname}") ++ set(prefixed_libname "TPL::${tplName}::${libname}") + if (NOT (prefixed_libname IN_LIST libTargets)) + tribits_extpkg_append_add_library_str (${libname} ${prefixed_libname} + ${libEntryType} "${libpath}" configFileStr) +@@ -571,6 +573,9 @@ function(tribits_extpkg_get_libname_and_path_from_libentry + elseif (libEntryType STREQUAL "LIB_NAME") + set(libname "${libentry}") + set(libpath "") ++ elseif (libEntryType STREQUAL "TARGET_NAME") ++ string(REGEX REPLACE "([^:]*::)+" "" libname "${libentry}") ++ set(libpath "") + else() + message(FATAL_ERROR "Error libEntryType='${libEntryType}' not supported here!") + endif() +@@ -605,6 +610,13 @@ function(tribits_extpkg_append_add_library_str + "set_target_properties(${prefixed_libname} PROPERTIES\n" + " IMPORTED_LIBNAME \"${libname}\")\n" + ) ++ elseif (libEntryType STREQUAL "TARGET_NAME") ++ string(REGEX REPLACE "([^:]*::)+" "" package_name "${libname}") ++ string(APPEND configFileStr ++ "#add_library(${prefixed_libname} IMPORTED INTERFACE)\n" ++ "#find_package(${package_name} REQUIRED)\n" ++ "#target_link_libraries(${prefixed_libname} INTERFACE ${libentry})\n" ++ ) + else() + message(FATAL_ERROR "Error libEntryType='${libEntryType}' not supported here!") + endif() +@@ -784,11 +796,11 @@ function(tribits_extpkg_create_all_libs_target tplName) + + # add_library() + string(APPEND configFileStr +- "add_library(${tplName}::all_libs INTERFACE IMPORTED)\n") ++ "add_library(TPL::${tplName}::all_libs INTERFACE IMPORTED)\n") + # target_link_libraries() + if (libTargets) + string(APPEND configFileStr +- "target_link_libraries(${tplName}::all_libs\n") ++ "target_link_libraries(TPL::${tplName}::all_libs\n") + foreach (libTarget IN LISTS libTargets) + string(APPEND configFileStr + " INTERFACE ${libTarget}\n") +@@ -799,7 +811,7 @@ function(tribits_extpkg_create_all_libs_target tplName) + # target_include_directories() + if (TPL_${tplName}_INCLUDE_DIRS) + string(APPEND configFileStr +- "target_include_directories(${tplName}::all_libs SYSTEM\n") ++ "target_include_directories(TPL::${tplName}::all_libs SYSTEM\n") + foreach (inclDir IN LISTS TPL_${tplName}_INCLUDE_DIRS) + string(APPEND configFileStr + " INTERFACE \"${inclDir}\"\n") +@@ -810,7 +822,7 @@ function(tribits_extpkg_create_all_libs_target tplName) + # target_link_options() + if (libLinkFlags) + string(APPEND configFileStr +- "target_link_options(${tplName}::all_libs\n") ++ "target_link_options(TPL::${tplName}::all_libs\n") + foreach (likLinkFlag IN LISTS libLinkFlags) + string(APPEND configFileStr + " INTERFACE \"${likLinkFlag}\"\n") +diff --git a/cmake/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake b/cmake/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake +index dcdde4ce6..aaec95d49 100644 +--- a/cmake/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake ++++ b/cmake/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake +@@ -154,9 +154,9 @@ function(tribits_process_enabled_tpl TPL_NAME) + set(buildDirExternalPkgsDir + "${${PROJECT_NAME}_BINARY_DIR}/${${PROJECT_NAME}_BUILD_DIR_EXTERNAL_PKGS_DIR}") + set(tplConfigFile +- "${buildDirExternalPkgsDir}/${TPL_NAME}/${TPL_NAME}Config.cmake") ++ "${buildDirExternalPkgsDir}/TPL-Seacas-${TPL_NAME}/TPL-Seacas-${TPL_NAME}Config.cmake") + set(tplConfigVersionFile +- "${buildDirExternalPkgsDir}/${TPL_NAME}/${TPL_NAME}ConfigVersion.cmake") ++ "${buildDirExternalPkgsDir}/TPL-Seacas-${TPL_NAME}/TPL-Seacas-${TPL_NAME}ConfigVersion.cmake") + tribits_extpkg_write_config_version_file(${TPL_NAME} + "${tplConfigVersionFile}") + tribits_extpkg_install_config_file(${TPL_NAME} "${tplConfigFile}") +diff --git a/cmake/tribits/core/package_arch/TribitsTplFindIncludeDirsAndLibraries.cmake b/cmake/tribits/core/package_arch/TribitsTplFindIncludeDirsAndLibraries.cmake +index d3cb102cf..3641799ac 100644 +--- a/cmake/tribits/core/package_arch/TribitsTplFindIncludeDirsAndLibraries.cmake ++++ b/cmake/tribits/core/package_arch/TribitsTplFindIncludeDirsAndLibraries.cmake +@@ -423,9 +423,7 @@ function(tribits_tpl_find_include_dirs_and_libraries TPL_NAME) + set(TPL_CMAKE_FIND_LIBRARY_SUFFIXES ${TPL_CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT}) + else() + if (WIN32) +- set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a) + else() +- set(CMAKE_FIND_LIBRARY_SUFFIXES .a ) + endif() + endif() + #print_var(CMAKE_FIND_LIBRARY_SUFFIXES) +@@ -717,7 +717,7 @@ function(tribits_tpl_find_include_dirs_and_libraries TPL_NAME) + set(buildDirExternalPkgsDir + "${${PROJECT_NAME}_BINARY_DIR}/${${PROJECT_NAME}_BUILD_DIR_EXTERNAL_PKGS_DIR}") +- set(tplConfigFileBaseDir "${buildDirExternalPkgsDir}/${TPL_NAME}") ++ set(tplConfigFileBaseDir "${buildDirExternalPkgsDir}/TPL-Seacas-${TPL_NAME}") +- set(tplConfigFile "${tplConfigFileBaseDir}/${TPL_NAME}Config.cmake") ++ set(tplConfigFile "${tplConfigFileBaseDir}/TPL-Seacas-${TPL_NAME}Config.cmake") + tribits_extpkg_write_config_file(${TPL_NAME} "${tplConfigFile}") + if (NOT ${PROJECT_NAME}_ENABLE_INSTALLATION_TESTING) + include("${tplConfigFile}") +diff --git a/cmake/tribits/core/package_arch/TribitsWriteClientExportFiles.cmake b/cmake/tribits/core/package_arch/TribitsWriteClientExportFiles.cmake +index 1f31b6ec0..9bc1057b7 100644 +--- a/cmake/tribits/core/package_arch/TribitsWriteClientExportFiles.cmake ++++ b/cmake/tribits/core/package_arch/TribitsWriteClientExportFiles.cmake +@@ -289,7 +289,11 @@ function(tribits_write_flexible_package_client_export_files) + + set(${PACKAGE_NAME}_TPL_LIBRARIES "") + foreach(TPL ${ORDERED_FULL_TPL_SET}) +- list(APPEND ${PACKAGE_NAME}_TPL_LIBRARIES ${TPL}::all_libs) ++ if(TARGET TPL::${TPL}::all_libs) ++ list(APPEND ${PACKAGE_NAME}_TPL_LIBRARIES TPL::${TPL}::all_libs) ++ else() ++ list(APPEND ${PACKAGE_NAME}_TPL_LIBRARIES ${TPL}::all_libs) ++ endif() + endforeach() + + # Generate a note discouraging editing of the <package>Config.cmake file +@@ -587,17 +591,21 @@ function(tribits_append_dependent_package_config_file_includes_and_enables packa + "\n# Include configuration of dependent packages\n") + foreach(depPkg IN LISTS ${packageName}_LIB_ENABLED_DEPENDENCIES) + set(packageConfigBaseDir "") # Initially, no add include() ++ set(packageTarget "${depPkg}::all_libs") ++ set(packageConfig "${depPkg}Config.cmake") + if (${depPkg}_PACKAGE_BUILD_STATUS STREQUAL "INTERNAL") + set(packageConfigBaseDir "${pkgConfigFileBaseDir}/${depPkg}") + elseif (${depPkg}_PACKAGE_BUILD_STATUS STREQUAL "EXTERNAL") +- set(packageConfigBaseDir "${extPkgConfigFileBaseDir}/${depPkg}") ++ set(packageConfigBaseDir "${extPkgConfigFileBaseDir}/TPL-Seacas-${depPkg}") ++ set(packageTarget "TPL::${depPkg}::all_libs") ++ set(packageConfig "TPL-Seacas-${depPkg}Config.cmake") + else() + message(FATAL_ERROR "ERROR: ${depPkg}_PACKAGE_BUILD_STATUS='${${depPkg}_PACKAGE_BUILD_STATUS}' invalid!") + endif() + if (packageConfigBaseDir) + string(APPEND configFileStr +- "if (NOT TARGET ${depPkg}::all_libs)\n" +- " include(\"${packageConfigBaseDir}/${depPkg}Config.cmake\")\n" ++ "if (NOT TARGET ${packageTarget})\n" ++ " include(\"${packageConfigBaseDir}/${packageConfig}\")\n" + "endif()\n" + ) + endif() +diff --git a/cmake/tribits/core/package_arch/TribitsExternalPackageFindTplHelpers.cmake b/cmake/tribits/core/package_arch/TribitsExternalPackageFindTplHelpers.cmake +index 1873267bd..ed6254632 100644 +--- a/cmake/tribits/core/package_arch/TribitsExternalPackageFindTplHelpers.cmake ++++ b/cmake/tribits/core/package_arch/TribitsExternalPackageFindTplHelpers.cmake +@@ -120,17 +120,21 @@ function(tribits_extpkg_create_package_config_file_with_imported_targets + "set(${externalPkg}_DIR \"${${externalPkg}_DIR}\")\n" ) + endif() + string(APPEND configFileStr +- "find_dependency(${externalPkg})\n" +- "add_library(${tplName}::all_libs INTERFACE IMPORTED GLOBAL)\n" ++ "find_dependency(${externalPkg})\n" # This is outside TPL ++ "if(NOT TARGET ${tplName}::all_libs)\n" ++ " add_library(${tplName}::all_libs INTERFACE IMPORTED GLOBAL)\n" + ) + foreach (importedTarget IN LISTS PARSE_IMPORTED_TARGETS_FOR_ALL_LIBS) + string(APPEND configFileStr +- "target_link_libraries(${tplName}::all_libs INTERFACE ${importedTarget})\n") ++ " target_link_libraries(${tplName}::all_libs INTERFACE ${importedTarget})\n") + endforeach() ++ string(APPEND configFileStr ++ "endif()\n" ++ ) + set(buildDirExternalPkgsDir + "${${PROJECT_NAME}_BINARY_DIR}/${${PROJECT_NAME}_BUILD_DIR_EXTERNAL_PKGS_DIR}") + set(tplConfigFile +- "${buildDirExternalPkgsDir}/${tplName}/${tplName}Config.cmake") ++ "${buildDirExternalPkgsDir}/TPL-Seacas-${tplName}/TPL-Seacas-${tplName}Config.cmake") + file(WRITE "${tplConfigFile}" "${configFileStr}") + + endfunction() +diff --git a/cmake/tribits/core/package_arch/TribitsExternalPackageWriteConfigFile.cmake b/cmake/tribits/core/package_arch/TribitsExternalPackageWriteConfigFile.cmake +index c49a2c019..7c906ce26 100644 +--- a/cmake/tribits/core/package_arch/TribitsExternalPackageWriteConfigFile.cmake ++++ b/cmake/tribits/core/package_arch/TribitsExternalPackageWriteConfigFile.cmake +@@ -334,9 +334,10 @@ function(tribits_extpkg_add_find_upstream_dependencies_str + endif() + string(APPEND configFileFragStr + "if (NOT TARGET TPL::${upstreamTplDepName}::all_libs)\n" +- " set(${upstreamTplDepName}_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../${upstreamTplDepName}\")\n" ++ " set(TPL-Seacas-${upstreamTplDepName}_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../TPL-Seacas-${upstreamTplDepName}\")\n" # Looks for internal dep ++ " # Really only upstream ? NO ! THis is for ::all_libs targets in internal consumers\n" + " find_dependency(TPL-Seacas-${upstreamTplDepName} REQUIRED CONFIG \${${tplName}_SearchNoOtherPathsArgs})\n" +- " unset(${upstreamTplDepName}_DIR)\n" ++ " unset(TPL-Seacas-${upstreamTplDepName}_DIR)\n" + "endif()\n" + "\n" + ) diff --git a/vcpkg/ports/seacas/netcdf-c.diff b/vcpkg/ports/seacas/netcdf-c.diff new file mode 100644 index 0000000..21c50ce --- /dev/null +++ b/vcpkg/ports/seacas/netcdf-c.diff @@ -0,0 +1,10 @@ +diff --git a/packages/seacas/libraries/exodus/CMakeLists.txt b/packages/seacas/libraries/exodus/CMakeLists.txt +index 2ed3ec4..99a20aa 100644 +--- a/packages/seacas/libraries/exodus/CMakeLists.txt ++++ b/packages/seacas/libraries/exodus/CMakeLists.txt +@@ -1,4 +1,5 @@ + TRIBITS_SUBPACKAGE(Exodus) ++add_compile_definitions(-DNETCDF_ENABLE_LEGACY_MACROS) + + if (SEACASExodus_ENABLE_STATIC) + INCLUDE(InstallSymLink) diff --git a/vcpkg/ports/seacas/portfile.cmake b/vcpkg/ports/seacas/portfile.cmake new file mode 100644 index 0000000..2d42c1b --- /dev/null +++ b/vcpkg/ports/seacas/portfile.cmake @@ -0,0 +1,134 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sandialabs/seacas + REF 47120843900fd7ef845688fa145ebf76a825bc51 + SHA512 13677746457edbd4b3619576a6c474f5d8ab2eb24f648fac687e655e3121282b62994575723d18db8d18b42266d219aa4d83344ecff53f5e9a737513a3461180 + HEAD_REF master + PATCHES fix_tpl_libs.patch + fix-ioss-includes.patch + deps-and-shared.patch + fix-mpi.patch + fix-headers.patch + fix-fmt-10.patch + fix-build-error-with-fmt11.patch + netcdf-c.diff + use-std-localtime.patch +) +file(REMOVE "${SOURCE_PATH}/cmake/tribits/common_tpls/find_modules/FindHDF5.cmake") + +if(HDF5_WITH_PARALLEL AND NOT "mpi" IN_LIST FEATURES) + message(WARNING "${HDF5_WITH_PARALLEL} Enabling MPI in seacas.") + list(APPEND FEATURES "mpi") +elseif(NOT VCPKG_TARGET_IS_OSX) + set(PARMETIS_FEATURES mpi TPL_ENABLE_ParMETIS) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + mpi TPL_ENABLE_MPI + matio TPL_ENABLE_Matio + # mpi TPL_ENABLE_Pnetcdf # missing Pnetcdf port + ${PARMETIS_FEATURES} +) + +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND FEATURE_OPTIONS "-DTPL_ENABLE_DLlib:BOOL=OFF") +endif() + +set(tpl_disable_list GTest DataWarp Pamgen X11 CUDA Kokkos Faodel Pnetcdf ADIOS2 Catalyst2) + +set(tpl_enable_list Zlib HDF5 Netcdf CGNS fmt Cereal) + +if(VCPKG_TARGET_IS_OSX) + list(APPEND tpl_disable_list METIS) +else() + list(APPEND tpl_enable_list METIS) +endif() + +set(tpl_options "") +foreach(tpl IN LISTS tpl_disable_list) + list(APPEND tpl_options "-DTPL_ENABLE_${tpl}:BOOL=OFF") +endforeach() +foreach(tpl IN LISTS tpl_enable_list) + list(APPEND tpl_options "-DTPL_ENABLE_${tpl}:BOOL=ON") +endforeach() + +set(disabled_projects Chaco Aprepro_lib SuplibC SuplibCpp Nemslice Nemspread Nas2exo Cpup Epu Ejoin Conjoin Aprepro Exo_format) +set(proj_options "") +foreach(proj IN LISTS disabled_projects) + list(APPEND proj_options "-DSeacas_ENABLE_SEACAS${proj}:BOOL=OFF") +endforeach() +set(enabled_projects Ioss Nemesis Exodus) +set(proj_options "") +foreach(proj IN LISTS disabled_projects) + list(APPEND proj_options "-DSeacas_ENABLE_SEACAS${proj}:BOOL=OFF") +endforeach() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + #--trace-expand + ${FEATURE_OPTIONS} + -DBUILD_TESTING=OFF + -DSeacas_ENABLE_Zoltan:BOOL=OFF + -DSeacas_ENABLE_SEACAS:BOOL=ON + "-DSeacas_HOSTNAME:STRING=localhost" + "-DSeacas_GENERATE_REPO_VERSION_FILE:BOOL=OFF" + "-DNetcdf_ALLOW_MODERN:BOOL=ON" + "-DNetcdf_FORCE_MODERN:BOOL=ON" + "-DSeacas_ENABLE_Fortran:BOOL=OFF" + #"-DCGNS_ALLOW_PREDEFIND:BOOL=NO" + #"-DSeacas_ENABLE_ALL_PACKAGES:BOOL=ON" + ${proj_options} + ${tpl_options} +) + +vcpkg_cmake_install() + +set(cmake_config_list ${enabled_projects}) +list(TRANSFORM cmake_config_list PREPEND "SEACAS") +list(APPEND cmake_config_list SEACAS) + +foreach(cmake_conig IN LISTS cmake_config_list) + vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${cmake_conig}" PACKAGE_NAME cmake/${cmake_conig} DO_NOT_DELETE_PARENT_CONFIG_PATH NO_PREFIX_CORRECTION) +endforeach() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/external_packages" PACKAGE_NAME external_packages DO_NOT_DELETE_PARENT_CONFIG_PATH NO_PREFIX_CORRECTION ) +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/Seacas") + # Case sensitive filesystems will have two Seacas folders + vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/Seacas" PACKAGE_NAME cmake/Seacas DO_NOT_DELETE_PARENT_CONFIG_PATH NO_PREFIX_CORRECTION) +endif() + +set(tool_names cgns_decomp cth_pressure_map + io_info io_modify io_shell + shell_to_hex skinner sphgen struc_to_unstruc) + +vcpkg_copy_tools(TOOL_NAMES ${tool_names} AUTO_CLEAN) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(GLOB remaining_bin_stuff "${CURRENT_PACKAGES_DIR}/bin/*" LIST_DIRECTORIES true) + if(NOT remaining_bin_stuff) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + else() + message(WARNING "remaining_bin_stuff:${remaining_bin_stuff}") + endif() +endif() + +# vcpkg really needs: vcpkg_remove_dirs_if_empty(<dirs>) +file(GLOB remaining_cmake_dirs "${CURRENT_PACKAGES_DIR}/lib/cmake/*" LIST_DIRECTORIES true) +if(NOT remaining_cmake_dirs) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake" "${CURRENT_PACKAGES_DIR}/debug/lib/cmake") +else() + message(WARNING "remaining_cmake_dirs:${remaining_cmake_dirs}") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE "${CURRENT_PACKAGES_DIR}/include/SeacasConfig.cmake") + +file(GLOB_RECURSE python_files LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/lib/*.py" "${CURRENT_PACKAGES_DIR}/debug/lib/*.py") +if(python_files) + file(REMOVE ${python_files}) +endif() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") + diff --git a/vcpkg/ports/seacas/use-std-localtime.patch b/vcpkg/ports/seacas/use-std-localtime.patch new file mode 100644 index 0000000..9e17333 --- /dev/null +++ b/vcpkg/ports/seacas/use-std-localtime.patch @@ -0,0 +1,32 @@ +diff --git a/packages/seacas/libraries/ioss/src/Ioss_Utils.C b/packages/seacas/libraries/ioss/src/Ioss_Utils.C +index 241ff80..2d3df83 100644 +--- a/packages/seacas/libraries/ioss/src/Ioss_Utils.C ++++ b/packages/seacas/libraries/ioss/src/Ioss_Utils.C +@@ -163,14 +163,27 @@ std::ostream &Ioss::Utils::get_debug_stream() { return *m_debugStream; } + void Ioss::Utils::time_and_date(char *time_string, char *date_string, size_t length) + { + std::time_t t = std::time(nullptr); ++#if FMT_VERSION < 120000 + std::string time = fmt::format("{:%H:%M:%S}", fmt::localtime(t)); ++#else ++ std::string time = fmt::format("{:%H:%M:%S}", *std::localtime(&t)); ++#endif + std::string date; ++#if FMT_VERSION < 120000 + if (length >= 10) { + date = fmt::format("{:%Y/%m/%d}", fmt::localtime(t)); + } + else { + date = fmt::format("{:%y/%m/%d}", fmt::localtime(t)); + } ++#else ++ if (length >= 10) { ++ date = fmt::format("{:%Y/%m/%d}", *std::localtime(&t)); ++ } ++ else { ++ date = fmt::format("{:%y/%m/%d}", *std::localtime(&t)); ++ } ++#endif + copy_string(time_string, time, 9); + copy_string(date_string, date, length + 1); + } diff --git a/vcpkg/ports/seacas/vcpkg.json b/vcpkg/ports/seacas/vcpkg.json new file mode 100644 index 0000000..db67b8c --- /dev/null +++ b/vcpkg/ports/seacas/vcpkg.json @@ -0,0 +1,75 @@ +{ + "name": "seacas", + "version-date": "2022-11-22", + "port-version": 10, + "description": "The Sandia Engineering Analysis Code Access System (SEACAS) is a suite of preprocessing, postprocessing, translation, and utility applications supporting finite element analysis software using the Exodus database file format.", + "homepage": "https://github.com/sandialabs/seacas", + "license": null, + "dependencies": [ + "cereal", + { + "name": "cgns", + "default-features": false, + "features": [ + "hdf5" + ] + }, + "fmt", + { + "name": "hdf5", + "default-features": false + }, + "metis", + { + "name": "netcdf-c", + "default-features": false, + "features": [ + "netcdf-4" + ] + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "matio": { + "description": "Enable Matio support", + "dependencies": [ + { + "name": "matio", + "default-features": false + } + ] + }, + "mpi": { + "description": "Enable MPI support", + "dependencies": [ + { + "name": "cgns", + "default-features": false, + "features": [ + "mpi" + ] + }, + { + "name": "hdf5", + "default-features": false, + "features": [ + "parallel" + ] + }, + { + "name": "parmetis", + "default-features": false, + "platform": "!osx" + } + ] + } + } +} |