diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index be81c3e20c1..d7020ffefe3 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -40,6 +40,8 @@ if(DNNL_ENABLE_JIT_PROFILING OR DNNL_ENABLE_ITT_TASKS) endif() list(APPEND SOURCES ${ITT_PT}) endif() + + set_property(GLOBAL APPEND PROPERTY DNNL_SUBDIR_EXTRA_SHARED_LIBS ${CMAKE_DL_LIBS}) endif() endif() diff --git a/src/common/cpp_compat.hpp b/src/common/cpp_compat.hpp index 3e4cb880b9f..e354871d847 100644 --- a/src/common/cpp_compat.hpp +++ b/src/common/cpp_compat.hpp @@ -30,7 +30,7 @@ namespace cpp_compat { // contains a compatibility layer for such C++ features. // Older than C++17. -#if defined(__cplusplus) && __cplusplus < 201703L || defined(_MSVC_LANG) && _MSVC_LANG < 201703L +#if defined(__cplusplus) && __cplusplus < 201703L && defined(_MSVC_LANG) && _MSVC_LANG < 201703L inline int uncaught_exceptions() { return (int)std::uncaught_exception(); }