Hi,
I had to make a few changes to get the CMake example to find compute++:
- add cmake_minimum_version and include(FindComputeCpp) (and add some CMAKE_MODULE_PATH)
- in FindComputeCpp.cmake, fix ENV{COMPUTECPP_DIR} to ENV{COMPUTECPP_ROOT_DIR} to make what the installer set
However, I get:
C:\src\computecpp-sdk\samples\build>cmake …
– Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
– platform - your system can support ComputeCpp
– Found ComputeCpp: C:/Program Files/Codeplay/ComputeCpp (found version “CE 2.3.0 2020/11/19”)
– compute++ flags - -O2;-mllvm;-inline-threshold=1000;-intelspirmetadata;-sycl-target;spir64;-DSYCL_LANGUAGE_VERSION=2017
CMake Error at /src/computecpp-sdk/cmake/Modules/ComputeCppCompilerChecks.cmake:52 (message):
compute++ cannot consume hosted STL headers. This means that compute++
can’t compile a simple program in this platform and will fail when used in
this system.
Call Stack (most recent call first):
/src/computecpp-sdk/cmake/Modules/FindComputeCpp.cmake:160 (include)
CMakeLists.txt:5 (include)
This is with the latest non-preview Visual Studio Community 2019, 16.8.3, and in my INCLUDE I have:
- C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include
- C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared (etc)
Is there a workaround?