Skip to content

Commit 11b0270

Browse files
author
Kent Knox
authored
Merge pull request #281 from IvanVergiliev/narrow-conversions
Disable clang error on narrowing conversions. 👍
2 parents 8028868 + c464ab9 commit 11b0270

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
319319
if(TARGET_PLATFORM EQUAL 32)
320320
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-builtin")
321321
endif()
322+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
323+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing")
322324
elseif( MSVC )
323325
# CMake sets huge stack frames for windows, for whatever reason. We go with compiler default.
324326
string( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" )

0 commit comments

Comments
 (0)