将下面改写成linux中的cmakelists.txt:cmake_minimum_required(VERSION 3.20) project(07_opencl_conv_test) set(CMAKE_CXX_STANDARD 11) include_directories(include) include_directories(common/inc) link_directories(lib) include_directories(${INC_DIR}) message(STATUS "OpenCV libraries: ${INC_DIR}") link_directories(${INC_DIR}) link_libraries(opencl.lib) message(STATUS "OpenCV libraries: ${INC_DIR}") add_executable(07_opencl_conv_test main.cpp)
时间: 2024-04-28 13:19:03 浏览: 153
cmake_minimum_required(VERSION 3.20)
project(07_opencl_conv_test)
set(CMAKE_CXX_STANDARD 11)
include_directories(include)
include_directories(common/inc)
include_directories(${INC_DIR})
link_directories(lib)
link_directories(${INC_DIR})
link_libraries(opencl)
message(STATUS "OpenCV libraries: ${INC_DIR}")
add_executable(07_opencl_conv_test main.cpp)
相关问题
CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.20 or higher is required. You are running version 3.16.3
这个错误提示说明你的 CMake 版本太低了,需要升级到 3.20 或更高版本。你可以前往 CMake 的官网下载最新版本进行安装,或者使用包管理器更新 CMake。如果你使用的是 Linux 系统,可以尝试使用以下命令更新 CMake:
Ubuntu/Debian 系统:
```
sudo apt-get update
sudo apt-get install cmake
```
CentOS/RHEL 系统:
```
sudo yum update
sudo yum install cmake
```
如果你使用的是 macOS,可以使用 Homebrew 进行安装:
```
brew update
brew install cmake
```
-- cmake version 3.22.1 CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to te
ll CMake the minimum required version for your project. For example, if you want to set the minimum required version to 3.22.1, you can modify your `CMakeLists.txt` file as follows:
```cmake
cmake_minimum_required(VERSION 3.22.1)
```
By specifying the minimum required version, you ensure that your project is compatible with that version or any higher versions of CMake. This warning is to inform you that compatibility with CMake versions older than 2.8.12 will be removed in the future.
阅读全文