Fix "undefined symbol: omp_get_max_active_levels" in mkl + <nothing else> builds
https://github.com/pytorch/pytorch/issues/116576
--- a/caffe2/CMakeLists.txt
+++ b/caffe2/CMakeLists.txt
@@ -1575,6 +1575,10 @@ if(BUILD_SHARED_LIBS)
     target_link_libraries(torch_global_deps TBB::tbb)
   endif()
 
+  if(USE_OPENMP)
+    target_link_libraries(torch_global_deps OpenMP::OpenMP_CXX)
+  endif()
+
   install(TARGETS torch_global_deps DESTINATION "${TORCH_INSTALL_LIB_DIR}")
 endif()
 
