安装cmake
操作步骤
- 使用PuTTY工具,以root用户登录服务器。
- 执行以下命令加载spack环境变量。
source /path/to/spack/share/spack/setup-env.sh
- 执行以下命令安装cmake 3.9.0。
spack -k install cmake@3.9.0%gcc@7.3.0
请使用3.9版本的cmake,其他cmake可能报以下错误。
Could NOT find MPI_Fortran (missing: MPI_Fortran_WORKS)
CMake Error at /usr/local/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Could NOT find MPI (missing: MPI_Fortran_FOUND) (found version "3.1")
- 执行以下命令加载cmake 3.9.0。
spack load cmake
父主题: 配置编译环境