Cleanup how compile flags are set and used by nGraph and external projects. (#2942)
* Cleanup how compile flags set and used by nGraph and external projects. Set C++11 through CMake and pass it down to external projects. Prefer CMake variables such as CMAKE_POSITION_INDEPENDENT_CODE and CMAKE_CXX_STANDARD instead of explicitly setting compiler dependent flags. Create json compilation database for external projects. CMAKE_CXX_FLAGS is used as common global options for nGraph and external projects. add_compile_options() is used for local options for current and sub directories. add_definitions() is used for setting definitions for current and sub directories. Note: Global options are not passed down to some external projects. Note: mkl-dnn resets CMAKE_CXX_FLAGS internally. Note: TBB and MLSL are not CMake based. Noet: Eigen and json is header only library. * Fix error. * Fix error. (second attempt) * Cleanup code. * Allow check for undefined macro. * Try to fix cldnn issue. * Set type for CMake arguments. * Pass C++ standard to protobuf. * Pass C++ standard down to TBB. * Change how Clang specific flags are handled. * Fix error. * Workaround for compile error on Baidu's PDPD docker. * Fix windows build error.
Showing
Please
register
or
sign in
to comment