diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b8c2631c79..e72f2b61f18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/ngraph/python/CMakeLists.txt b/ngraph/python/CMakeLists.txt index 9fbe284db9c..5840f71214f 100644 --- a/ngraph/python/CMakeLists.txt +++ b/ngraph/python/CMakeLists.txt @@ -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