File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ IF (NOT INTEL_EXT_PT_CPU_FOUND)
1111FIND_PACKAGE (Torch REQUIRED)
1212FIND_LIBRARY (INTEL_EXT_PT_CPU_LIBRARY libintel-ext -pt-cpu.so PATHS "${TORCH_INSTALL_PREFIX} /lib" )
1313if (INTEL_EXT_PT_CPU_LIBRARY)
14- LIST (APPEND TORCH_LIBRARIES ${INTEL_EXT_PT_CPU_LIBRARY} )
15- SET (TORCH_CXX_FLAGS "${TORCH_CXX_FLAGS} -Wl,--no-as-needed" )
14+ add_library (intel_ext_pt_cpu_library INTERFACE IMPORTED )
15+ set_target_properties (intel_ext_pt_cpu_library PROPERTIES
16+ INTERFACE_LINK_LIBRARIES "-Wl,--no-as-needed,\" ${INTEL_EXT_PT_CPU_LIBRARY} \" "
17+ )
18+
19+ LIST (APPEND TORCH_LIBRARIES intel_ext_pt_cpu_library)
1620
1721 SET (INTEL_EXT_PT_CPU_FOUND TRUE )
1822 MESSAGE (STATUS "Found INTEL_EXT_PT_CPU: TRUE" )
2125endif ()
2226
2327ENDIF (NOT INTEL_EXT_PT_CPU_FOUND)
28+
You can’t perform that action at this time.
0 commit comments