Skip to content

Commit 8e84608

Browse files
Align dpnp.tensor CMake flags with dpctl.tensor
1 parent e1a18a5 commit 8e84608

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dpnp/tensor/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@
2929

3030
find_package(Python COMPONENTS Development.Module)
3131

32+
# Tensor-specific flags
33+
34+
# dpctl doesn't add -fsycl globally
35+
# only to pybind11 module sources via add_sycl_to_target()
36+
string(REPLACE "-fsycl " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
37+
38+
# Use LLD linker (dpctl sets this at root level)
39+
if(UNIX)
40+
add_link_options("-fuse-ld=lld")
41+
endif()
42+
3243
# Remove global coverage flags for tensor
3344
# use link-time only approach like dpctl
3445
if(DPNP_GENERATE_COVERAGE)
@@ -55,6 +66,7 @@ if(
5566
endif()
5667
endif()
5768

69+
# Match dpctl warning flags
5870
# Suppress unused parameter warnings
5971
add_compile_options(-Wno-unused-parameter)
6072

0 commit comments

Comments
 (0)