cpu_features: fix clang, set cast-align to warning
Change -Wcast-align from error to warning for clang compiler by adding the -Wno-error=cast-align compiler flag. Fixes #881
This commit is contained in:
parent
568a483435
commit
4979b7733e
1 changed files with 4 additions and 0 deletions
4
external/cpu_features/CMakeLists.txt
vendored
4
external/cpu_features/CMakeLists.txt
vendored
|
|
@ -5,6 +5,10 @@ project(CpuFeatures VERSION 0.1.0)
|
|||
# ANBOX allow to build in our more strict build environment
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=switch-default -Wno-error=unused-parameter -Wno-error=overflow")
|
||||
|
||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=cast-align")
|
||||
endif()
|
||||
|
||||
# Default Build Type to be Release
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue