问题描述
我在安装C ++库时遇到问题. CMake 命令成功并生成了Makefile,但它给出了警告:
I am running into issues installing a C++ library. The CMake command is successful and generates the Makefile, but it gives a warning:
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行是
Line 27 in CMakeLists.txt is
Boost_LIBRARY_DIR_DEBUG:PATH=/usr/local/lib
我不明白为什么这个警告会引起我任何问题.但是当我运行make install时,出现错误:
I don't see why this warning would cause me any issues. But when I run make install, I get an error:
make: *** No rule to make target `install'. Stop.
有什么想法吗?
推荐答案
能否提供完整的makefile?但是现在我可以告诉您-您应该检查安装"目标是否已经存在.因此,请检查Makefile是否包含
Could you provide a whole makefile?But right now I can tell - you should check that "install" target already exists. So, check Makefile whether it contains a
install: (anything there)
行.如果没有,就没有这样的目标,因此make就是正确的.也许您应该只使用"make"命令进行编译,然后按原样使用它,或者手动安装自己.
line. If not, there is no such target and so make has right. Probably you should use just "make" command to compile and then use it as is or install yourself, manually.
安装不是make的任何标准,它只是可能存在的通用目标,但不是必需的.
Install is not any standard of make, it is just a common target, that could exists, but not necessary.
这篇关于“没有规则可以使目标'install'" ...但是Makefile存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!