我在安装C ++库时遇到问题。该CMake的命令是成功的,产生的Makefile,但它给出了一个警告:
CMake Warning (dev) at CMakeLists.txt:27 (LINK_DIRECTORIES):
This command specifies the relative path
../usr/local/lib
as a link directory.
Policy CMP0015 is not set: link_directories() treats paths relative to the
source dir. Run "cmake --help-policy CMP0015" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
CMakeLists.txt中的第27行是
Boost_LIBRARY_DIR_DEBUG:PATH=/usr/local/lib
我不明白为什么这个警告会引起我任何问题。但是当我运行make install时,出现错误:
make: *** No rule to make target `install'. Stop.
有任何想法吗?
你能提供一个完整的makefile吗?但是现在我可以告诉您-您应该检查“安装”目标是否已经存在。因此,请检查Makefile是否包含
install: (anything there)
线。如果没有,就没有这样的目标,因此make就是正确的。可能您应该只使用“ make”命令进行编译,然后按原样使用它,或者手动安装自己。
安装不是make的任何标准,它只是可能存在的通用目标,但不是必需的。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句