[IE][VPU]: Fix behavior tests for MXpcie (#1879)
[platform/upstream/dldt.git] / inference-engine / thirdparty / CMakeLists.txt
index 1cb62b2..9eba9a8 100644 (file)
@@ -5,6 +5,15 @@
 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unknown-warning-option -Wno-error=inconsistent-missing-override -Wno-error=pass-failed")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unknown-warning-option -Wno-error=inconsistent-missing-override -Wno-error=pass-failed")
+elseif(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.1)
+    # On g++ 9.3.0 (Ubuntu 20.04) the ADE library raises "redundant-move" warnings
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=redundant-move")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=redundant-move")
+elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") AND ("${MSVC_VERSION}" VERSION_GREATER_EQUAL "1920"))
+    # 1920 version of MSVC 2019
+    # This flagis needed for enabling SIMD vectorization with command '#pragma omp simd'.
+    # Compilation with '/openmp:experimental' key allow us to enable vectorizatikon capability in MSVC.
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp:experimental")
 endif()
 
 function(build_with_lto)
@@ -59,11 +68,11 @@ function(build_with_lto)
         ie_developer_export_targets(pugixml_mt)
         set_target_properties(pugixml_mt PROPERTIES FOLDER thirdparty)
     endif()
+
+    if(ENABLE_MKL_DNN)
+        set(SDL_cmake_included ON)
+        include(mkldnn.cmake)
+    endif()
 endfunction()
 
 build_with_lto()
-
-if(ENABLE_MKL_DNN)
-    set(SDL_cmake_included ON)
-    include(mkldnn.cmake)
-endif()