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

@ -12,6 +12,6 @@ if (OPENZWAVE_FOUND)
# openzwave/aes/aes.h has unknown pragmas, disable warning -Wunknown-pragmas
compiler_flag_supported(CXX is_supported -Wno-unknown-pragmas)
if (is_supported)
target_compile_options(${libname} PRIVATE -Wno-unknown-pragmas)
target_compile_options(${libname} PUBLIC -Wno-unknown-pragmas)
endif (is_supported)
endif ()