diff --git a/cmake/modules/xsmm-dnn.cmake b/cmake/modules/xsmm-dnn.cmake index c72c8d512..b51a67ed5 100644 --- a/cmake/modules/xsmm-dnn.cmake +++ b/cmake/modules/xsmm-dnn.cmake @@ -46,6 +46,6 @@ target_include_directories(xsmm_dnn_mlp PRIVATE ${XSMM_DNN_INCLUDE_DIRS}) target_link_libraries(xsmm_dnn_mlp PRIVATE xsmm) if (OPENMP_FOUND) target_compile_options(xsmm_dnn_mlp PRIVATE ${OpenMP_C_FLAGS}) - target_link_libraries(xsmm_dnn_mlp PRIVATE omp) + target_link_libraries(xsmm_dnn_mlp PRIVATE OpenMP::OpenMP_C) endif() install(TARGETS xsmm_dnn_mlp RUNTIME DESTINATION bin) diff --git a/tools/tpp-run/CMakeLists.txt b/tools/tpp-run/CMakeLists.txt index 92470d61f..f1d639a21 100644 --- a/tools/tpp-run/CMakeLists.txt +++ b/tools/tpp-run/CMakeLists.txt @@ -9,10 +9,6 @@ if(USE_OneDNN) set(ONEDNN_LIBS_INCL "-ltpp_dnnl_runner_utils") endif() -if(USE_OpenMP) - set(OPENMP_LIBS_INCL "-lomp") -endif() - set(LIBS ${dialect_libs} ${conversion_libs} @@ -88,7 +84,7 @@ target_link_options(tpp-run PRIVATE -lmlir_runner_utils -lmlir_async_runtime ${TPP_GPU_LINK_FLAGS} - ${OPENMP_LIBS_INCL} + $<$:${OpenMP_C_LIBRARIES}> -Wl,--as-needed )