cxx_warnings: Misc changes to enable Werror

* CMake option to enable -Werror as default
    * Change to make sure all cxx examples have correct target name
    * Added PUBLIC CXX compiler flags to ads1x15 and ozw targets to
      work around compiler warnings
    * Renamed cmake variable for compiler warnings

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2016-11-03 16:10:35 -07:00
parent 601d25cebc
commit 9be920dbcd
6 changed files with 66 additions and 51 deletions

View File

@ -2,4 +2,8 @@ set (libname "ads1x15")
set (libdescription "Analog to digital converter")
set (module_src ${libname}.cxx ads1115.cxx ads1015.cxx)
set (module_hpp ${libname}.hpp ads1115.hpp ads1015.hpp)
upm_module_init()
upm_module_init()
compiler_flag_supported(CXX is_supported -Wno-overloaded-virtual)
if (is_supported)
target_compile_options(${libname} PUBLIC -Wno-overloaded-virtual)
endif(is_supported)