赞
踩
- CMake Warning (dev) at CMakeLists.txt:8 (find_package):
- Policy CMP0146 is not set: The FindCUDA module is removed. Run "cmake
- --help-policy CMP0146" 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的警告,不影响正常编译结束,但是可以让这个警告去掉,让编译输出更干净。主要是因为cmake政策的更新导致的,可以仍使用旧版本的政策。
解决方案:
在CMakeLists.txt的 find_package(CUDA) 前面加上如下内容:
- if(POLICY CMP0146)
- cmake_policy(SET CMP0146 OLD)
- endif()
如下:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。