CMake构建问题:Could NOT find Threads (missing: Threads_FOUND)

本文记录了在CentOS 7环境下遇到的CMake编译dmclock源码问题,详细描述了从查找解决方案、尝试修改CMakeLists文件到最终决定升级CMake版本的过程。分享了下载、解压、检查环境、编译、安装及卸载旧版本并为新版本建立软链接的完整步骤。

今天使用CMake编译dmclock源码,结果出现了下面这个令人头疼的问题:

cmake ..

在这里插入图片描述

在网上查到的唯一的解决方法是修改CMakeLists文件:

project(dmclock CXX) --> project(dmclock C CXX)

但是,cmake阶段没出问题,结果在make阶段出了问题:

在这里插入图片描述

所以,这种方法也不能解决问题。多次查资料,未果,我觉得是cmake的版本出了问题。我的版本是2.8.12,于是我决定升级到3:

首先下载cmake 3.6,并解压,检查环境:

wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz    
tar xvf cmake-3.6.2.tar.gz && cd cmake-3.6.2/
./bootstrap

编译,安装:

gmake
gmake install

查看新版本:

/usr/local/bin/cmake --version

卸载旧版本,并为新版本建立软链接:

yum remove cmake -y
ln -s /usr/local/bin/cmake /usr/bin/
cmake --version

参考资料:

  1. centos7下升级cmake,很简单
Setting build type to 'Release' as none was specified. Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100. The C compiler identification is MSVC 19.41.34123.0 The CXX compiler identification is MSVC 19.41.34123.0 Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working C compiler: D:/visual studio/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped Detecting C compile features Detecting C compile features - done Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Check for working CXX compiler: D:/visual studio/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped Detecting CXX compile features Detecting CXX compile features - done Setting global options Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) Found TIFF: D:/anaconda/Library/lib/cmake/tiff (found version "4.5.1") Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) Looking for sgemm_ Looking for sgemm_ - not found Performing Test CMAKE_HAVE_LIBC_PTHREAD Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed Looking for pthread_create in pthreads Looking for pthread_create in pthreads - not found Looking for pthread_create in pthread Looking for pthread_create in pthread - not found Found Threads: TRUE Could NOT find BLAS (missing: BLAS_LIBRARIES) Could NOT find LAPACK (missing: LAPACK_LIBRARIES) Reason given by package: LAPACK could not be found because dependency BLAS could not be found. Could NOT find BLAS (missing: BLAS_LIBRARIES) Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Could NOT find FFTW (missing: FFTW_INCLUDE_DIRS) Performing Test COMPILER_HAS_DEPRECATED_ATTR Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed Performing Test COMPILER_HAS_DEPRECATED Performing Test COMPILER_HAS_DEPRECATED - Success Setting matplotplusplus compiler options Looking for __fbufsize Looking for __fbufsize - not found CMAKE_INSTALL_PREFIX=C:/Program Files/Matplot++ CMAKE_INSTALL_LIBDIR=lib Configuring done (39.8s)请问我这个结果是否成功配置好
03-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值