mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-02 07:20:16 +00:00
libusb: treat warnings as errors in cmake build
This commit is contained in:
parent
e5d43f34a8
commit
51342da5f4
@ -12,10 +12,10 @@ link_libraries( usb-1.0 )
|
|||||||
# extra compiler warnings
|
# extra compiler warnings
|
||||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang.*")
|
if ("${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang.*")
|
||||||
# using Clang
|
# using Clang
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-variable -Wswitch-default")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-variable -Wswitch-default -Werror")
|
||||||
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||||
# using GCC
|
# using GCC
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-but-set-variable -Wunused-variable -Wswitch-default")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-but-set-variable -Wunused-variable -Wswitch-default -Werror")
|
||||||
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
|
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
|
||||||
# using Intel C++
|
# using Intel C++
|
||||||
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user