在我的CMakeLists.txt中
include (CheckFunctionExists.cmake)
当我跑步时ccmake
(我正在关注官方教程)
CMake Error at CMakeLists.txt:10 (include):
include could not find load file:
CheckFunctionExists.cmake
但是,我有指定的文件:
sw3@pc90313-sw3:~/learn_cmake/build$ find / -name CheckFunctionExists.cmake 2>/dev/null
/usr/share/cmake-2.8/Modules/CheckFunctionExists.cmake
我正在从Ubuntu 13.04存储库使用cmake安装:
sw3@pc90313-sw3:~/learn_cmake/build$ cmake --version
cmake version 2.8.10.1
如果指定了绝对路径,则一切正常,并生成一个有效的makefile。但是,这种解决方法远非理想(并且与本教程有所不同)。问题可能在哪里?
该路径称为${CMAKE_ROOT}
。因此,正确的系统文件包含命令是
include (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
,稍后在本教程中提到。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句