我在使用Cmake构建FLANN库时遇到了问题。我使用的编译器是VS 2005编译器。
我在构建过程中遇到的错误如下。提前致谢。 FLANN源可以从here
下载The C compiler identification is MSVC 14.0.50727
The CXX compiler identification is MSVC 14.0.50727
Check for working C compiler using: Visual Studio 8 2005
Check for working C compiler using: Visual Studio 8 2005 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 8 2005
Check for working CXX compiler using: Visual Studio 8 2005 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
CMakeLists.txt上的CMake警告(dev):3(add_definitions): 未设置策略CMP0005:现在转义预处理器定义值 自动。运行“cmake --help-policy CMP0005”获取策略详细信息。使用 cmake_policy命令用于设置策略并禁止显示此警告。 此警告适用于项目开发人员。使用-Wno-dev来抑制它。
CMake Error at CMakeLists.txt:115 (install): install TARGETS given no ARCHIVE DESTINATION for static library target "flann_cpp_s". CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 2.8) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it.
Configuring incomplete, errors occurred!
See also "C:/FlannLib/CMakeFiles/CMakeOutput.log".
答案 0 :(得分:2)
对于任何未来的读者,此错误可能是由于为CMake提供了错误的源代码目录。
源代码目录必须是根目录(包含bin
,src
,examples
等),而不是src
子目录。