-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCLomatic] support migration of cmake syntax: target_link_libraries (…
…#1571) Signed-off-by: Ahmed, Daiyaan <[email protected]>
- Loading branch information
1 parent
7dd458d
commit adf9fb6
Showing
5 changed files
with
210 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
clang/test/dpct/cmake_migration/case_004/case_004_target_link_libraries.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// RUN: rm -rf %T && mkdir -p %T | ||
// RUN: cd %T | ||
// RUN: cp %S/input.cmake ./input.cmake | ||
// RUN: dpct -in-root ./ -out-root out ./input.cmake --migrate-cmake-script-only | ||
// RUN: echo "begin" > %T/diff.txt | ||
// RUN: diff --strip-trailing-cr %S/expected.txt %T/out/input.cmake >> %T/diff.txt | ||
// RUN: echo "end" >> %T/diff.txt | ||
|
||
// CHECK: begin | ||
// CHECK-NEXT: end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
target_link_libraries(main PRIVATE cxxopts fmt::fmt -qmkl) | ||
|
||
target_link_libraries(foo3 PUBLIC ${TCNN_LIBRARIES} fmt) | ||
|
||
target_link_libraries(transformer_engine PUBLIC | ||
-qmkl | ||
|
||
|
||
|
||
|
||
${DNN_LIB}) | ||
|
||
target_link_libraries(${target} PRIVATE | ||
-static-libgcc | ||
|
||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
|
||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
target_link_libraries(main PRIVATE cxxopts fmt::fmt -lcublas) | ||
|
||
target_link_libraries(foo3 PUBLIC ${CUDA_LIBRARIES} ${TCNN_LIBRARIES} fmt) | ||
|
||
target_link_libraries(transformer_engine PUBLIC | ||
CUDA::cublas | ||
CUDA::cuda_driver | ||
CUDA::cudart | ||
CUDA::nvrtc | ||
CUDA::nvToolsExt | ||
cudnn) | ||
|
||
target_link_libraries(${target} PRIVATE | ||
-static-libgcc | ||
-static-libstdc++ | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
libnvinfer.so | ||
libnvonnxparser.so | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters