我在 Windows 10 中使用 Intel oneAPI Base Toolkit 2024 和 VSCode。我已按照指南进行操作,并使用可用的 VSCode 扩展激活了默认的 oneAPI 配置环境。
我已按照英特尔® oneAPI DPC++/C++ 编译器开发人员指南和参考将 CMake 与 CLI 结合使用,并编写了以下 CMakeLists.txt:
if (CMAKE_HOST_WIN32)
# need CMake 3.25.0+ for IntelLLVM support of target link properties on Windows
cmake_minimum_required(VERSION 3.25)
else()
# CMake 3.23.5 is the minimum recommended for IntelLLVM on Linux
cmake_minimum_required(VERSION 3.23.5)
endif()
find_package(IntelSYCL REQUIRED)
仅通过测试此文件,我收到以下错误:
CMake Error at CMakeLists.txt:19 (find_package):
Found package configuration file:
C:/Program Files (x86)/Intel/oneAPI/compiler/latest/lib/cmake/IntelSYCL/IntelSYCLConfig.cmake
but it set IntelSYCL_FOUND to FALSE so package "IntelSYCL" is considered to
be NOT FOUND. Reason given by package:
Unsupported compiler family MSVC and compiler C:/Program Files/Microsoft
Visual
Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe!!
我不明白发生了什么。