CMake Warning (dev) in data-plane/suricata-3.0/src/CMakeLists.txt: Policy CMP0111 is not set: An imported target missing its location property fails during generation. Run "cmake --help-policy CMP0111" for policy details. Use the cmake_policy command to set the policy and suppress this warning. IMPORTED_LOCATION not set for imported target "nanomsg". This warning is for project developers. Use -Wno-dev to suppress it.
时间: 2024-03-14 19:48:42 浏览: 38
这是一个 CMake 的警告信息,意思是某个名为 "nanomsg" 的外部库的导入目标的属性 IMPORTED_LOCATION 没有被设置。这可能导致编译过程中出现问题。要解决这个警告,可以通过设置 CMake 的策略 CMP0111 来禁用它,或者在 CMakeLists.txt 文件中设置该导入目标的 IMPORTED_LOCATION 属性。如果你不是开发者,可以使用 -Wno-dev 参数来忽略该警告。
相关问题
CMake Warning (dev) in data-plane/suricata-3.0/src/CMakeLists.txt: Policy CMP0111 is not set: An imported target missing its location property fails during generation. Run "cmake --help-policy CMP0111" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
这是 CMake 的一个开发者警告,意思是当前 CMakeLists.txt 文件中使用了一个未设置位置属性的导入目标,可能会在生成期间失败。建议开发者使用 cmake_policy 命令来设置 CMP0111 策略并禁用该警告,或者在 CMakeLists.txt 文件中设置该导入目标的位置属性,以免出现编译问题。如果你不是开发者,可以使用 -Wno-dev 参数来忽略该警告。
CMake Error at data-plane/suricata-3.0/src/CMakeLists.txt:685 (ADD_LIBRARY): ADD_LIBRARY called with IMPORTED argument but no library type. CMake Error at data-plane/suricata-3.0/src/CMakeLists.txt:686 (TARGET_LINK_LIBRARIES): Cannot specify link libraries for target "nanomsg" which is not built by this project.
这个错误提示的意思是,在 `data-plane/suricata-3.0/src/CMakeLists.txt` 文件的第 685 行,使用了 `ADD_LIBRARY` 命令,但是没有指定库的类型。通常情况下,需要在 `ADD_LIBRARY` 命令中指定库的类型,例如 `STATIC` 或 `SHARED`。
另外,在第 686 行,使用了 `TARGET_LINK_LIBRARIES` 命令指定了一个名为 `nanomsg` 的库进行链接。然而,这个库并不是由当前项目构建的,因此无法进行链接。如果要链接外部库,需要使用 `find_package` 命令或者 `find_library` 命令找到该库,并将其导入到当前项目中。
要解决这个问题,可以检查 `ADD_LIBRARY` 命令的语法是否正确,并且确保引用的外部库已经成功导入到当前项目中。