From b751683c826acc12cd454cebf3f9844559250b00 Mon Sep 17 00:00:00 2001 From: Ilya Churaev Date: Mon, 19 Apr 2021 10:24:26 +0300 Subject: [PATCH] Fixed macOS compilation (#5283) * Fixed macOS compilation * Added -Wno-undef --- ngraph/python/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ngraph/python/CMakeLists.txt b/ngraph/python/CMakeLists.txt index ff54b570bce..abb1078689f 100644 --- a/ngraph/python/CMakeLists.txt +++ b/ngraph/python/CMakeLists.txt @@ -66,9 +66,9 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") add_compile_options(-Wno-error=attributes) endif() -if(CMAKE_COMPILER_IS_GNUCXX AND Python_VERSION VERSION_GREATER_EQUAL "3.9") +if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND Python_VERSION VERSION_GREATER_EQUAL "3.9") # for proper fix need to update pybind to version which does not use PyEval_InitThreads() - add_compile_options(-Wno-deprecated-declarations) + add_compile_options(-Wno-deprecated-declarations -Wno-undef) endif() # create target