首页 > 解决方案 > mac上如何设置HDF5_DIR为hdf5安装目录

问题描述

cmake/thirdparty/SetupGeosxThirdParty.cmake:131 处的 CMake 错误(消息):GEOSX 需要 hdf5,将 HDF5_DIR 设置为 hdf5 安装目录。

标签: hdf5

解决方案


假设cmake您使用的文件名为GEOSX/host-configs/ubuntu-gcc.cmake,请将其添加到顶部(替换<my_base_dir>为 GeosX 基本目录)

# file: ubuntu-gcc.cmake

set(BASE_DIR "<my_base_dir>" CACHE PATH "" FORCE)

# if building TPLs from the tplMirror repository, set GEOSX_TPL_DIR variable to point to the TPL installation path...
set(GEOSX_TPL_DIR "${BASE_DIR}/thirdPartyLibs/install-ubuntu-gcc-release" CACHE PATH "" FORCE)
# ... , and
include("${BASE_DIR}/GEOSX/host-configs/tpls.cmake")

然后将找到所有第三方库。我通过了这个障碍,尽管我无法完成编译。


推荐阅读