【发布时间】:2013-12-19 07:52:01
【问题描述】:
我在使用 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:3 (add_definitions) 处的 CMake 警告 (dev): 未设置策略 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".
【问题讨论】:
-
如果您不打算运行
make install,您可以删除该行(它调用install(TARGETS ...)),它仍然会编译 -
我现在有另一个问题。我的程序必须使用 flann::Matrix
m ,我现在不知道如何将 Cmake 制作的文件集成到我的项目中。编译Cmake创建的项目后得到一个名为flann_cpp.obj的文件。
标签: cmake