File tree Expand file tree Collapse file tree 5 files changed +37
-0
lines changed
test/dpct/cmake_migration/case_012 Expand file tree Collapse file tree 5 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: rm -rf %T && mkdir -p %T
2
+ // RUN: cd %T
3
+ // RUN: cp %S/input.cmake ./input.cmake
4
+ // RUN: dpct -in-root ./ -out-root out ./input.cmake --migrate-cmake-script-only
5
+ // RUN: echo "begin" > %T/diff.txt
6
+ // RUN: diff --strip-trailing-cr %S/expected.txt %T/out/input.cmake >> %T/diff.txt
7
+ // RUN: echo "end" >> %T/diff.txt
8
+
9
+ // CHECK: begin
10
+ // CHECK-NEXT: end
Original file line number Diff line number Diff line change
1
+ dpct_add_mkl_to_target(culib)
2
+ dpct_add_mkl_to_target(
3
+ culib
4
+ )
Original file line number Diff line number Diff line change
1
+ CUDA_ADD_CUFFT_TO_TARGET(culib)
2
+ cuda_add_cufft_to_target(
3
+ culib
4
+ )
Original file line number Diff line number Diff line change 264
264
CmakeSyntax : add_executable_opts
265
265
In : add_executable(${value} OPTIONS ${options})
266
266
Out : add_executable(${value})
267
+
268
+ - Rule : rule_cuda_add_cufft_to_target
269
+ Kind : CMakeRule
270
+ Priority : Fallback
271
+ CmakeSyntax : cuda_add_cufft_to_target
272
+ In : cuda_add_cufft_to_target(${target})
273
+ Out : dpct_add_mkl_to_target(${target})
274
+
Original file line number Diff line number Diff line change @@ -78,3 +78,14 @@ endmacro()
78
78
# Always set SYCL_HAS_FP16 to true to assume SYCL device to support float16
79
79
message ("dpct.cmake: SYCL_HAS_FP16 is set true by default." )
80
80
set (SYCL_HAS_FP16 TRUE )
81
+
82
+ # Link MKL library to target
83
+ macro (DPCT_ADD_MKL_TO_TARGET target )
84
+ if (WIN32 )
85
+ target_link_libraries (${target} mkl_sycl_dll.lib mkl_intel_ilp64_dll.lib mkl_tbb_thread_dll.lib mkl_core_dll.lib OpenCL.lib)
86
+ elseif (UNIX AND NOT APPLE )
87
+ target_link_libraries (${target} -L${MKLROOT} /lib/intel64 -lmkl_intel_ilp64 -lmkl_tbb_thread -lmkl_core -lOpenCL -lmkl_sycl -lpthread -ldl)
88
+ else ()
89
+ message (FATAL_ERROR "Unsupported platform" )
90
+ endif ()
91
+ endmacro ()
You can’t perform that action at this time.
0 commit comments