WA for GCC 7.5 pybind warning (#4277)

* WA for GCC 7.5 pybind warning

* Move compiler flag to ngraph/python
This commit is contained in:
Jan Iwaszkiewicz 2021-02-11 16:41:23 +01:00 committed by GitHub
parent f8d36c55a8
commit 7ff8f8eba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,7 @@ function(build_ngraph)
elseif(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4308 /wd4146 /wd4703 /wd4244 /wd4819")
endif()
if(ENABLE_LTO)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
endif()

View File

@ -60,6 +60,9 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
add_link_options(-stdlib=libc++)
add_compile_options(-Wno-unused-value)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# WA for GCC 7.5 "PYBIND11_NOINLINE inline" warning
add_compile_options(-Wno-error=attributes)
endif()
# create target