mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Avoid Clang c++11-narrowing error
Downgrades c++11-narrowing to a warning when compiling with Clang. A better solution would be to fix the error, but this at least brings Clang in line with the more permissive GCC, which treats this as a warning by default.
This commit is contained in:
@@ -21,6 +21,12 @@ if("${CMAKE_INTERPROCEDURAL_OPTIMIZATION}" STREQUAL "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# FIXME: Clang treats this as an error by default; fixing the source rather
|
||||
# than downgrading the error to a warning would be a better solution.
|
||||
add_compile_options(
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-error=c++11-narrowing>
|
||||
)
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
if(PLATFORM STREQUAL "MAC")
|
||||
|
Reference in New Issue
Block a user