================
@@ -0,0 +1,34 @@
+if(CMAKE_CLC_COMPILER_FORCED)
+ set(CMAKE_CLC_COMPILER_WORKS TRUE)
+ return()
+endif()
+
+set(_test_file "${CMAKE_CURRENT_LIST_DIR}/CMakeCLCCompilerTest.cl")
+set(_test_dir "${CMAKE_PLATFORM_INFO_DIR}/CMakeTmp")
+set(_test_out "${_test_dir}/test_clc.o")
+file(MAKE_DIRECTORY "${_test_dir}")
+
+message(STATUS "Check for working CLC compiler: ${CMAKE_CLC_COMPILER}")
+
+execute_process(
+ COMMAND "${CMAKE_CLC_COMPILER}" -x cl -c -flto
----------------
jhuber6 wrote:
This is intentionally weak, we cannot do a full source-to-binary test as
targets like NVPTX require external binaries the user might not have. Compiling
OpenCL to LLVM-IR is a compromise.
https://github.com/llvm/llvm-project/pull/185243
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits