Windows 10,VS 2013:配置OpenCL程序时出现Cmake错误

时间:2017-10-24 15:09:31

标签: cmake opencl

我正在尝试在Windows中构建此Github project。得到以下错误。我已经安装了AMD SDK并添加了PATH变量的路径。请让我知道如何克服这个问题。

CMake Error at CMakeLists.txt:94 (find_package):
  By not providing "FindOpenCL.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenCL", but
  CMake did not find one.

  Could not find a package configuration file provided by "OpenCL" with any
  of the following names:

    OpenCLConfig.cmake
    opencl-config.cmake

  Add the installation prefix of "OpenCL" to CMAKE_PREFIX_PATH or set
  "OpenCL_DIR" to a directory containing one of the above files.  If "OpenCL"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!

1 个答案:

答案 0 :(得分:0)

根据文档,CMake从3.1版开始提供FindOpenCL.cmake模块。因此,至少需要CMake 3.1才能构建给定的项目。

实际上,项目的cmake_minimum_required应该提供正确的约束。