Skip to content

Commit 4e5118b

Browse files
vhavelVojtech Havel
andauthored
Fix build with clang-{10,11} (#492)
Newer clang versions report several "Wimplicit-int-float-conversion" warnings. This commit silences this warning completely. Co-authored-by: Vojtech Havel <[email protected]>
1 parent 11106a6 commit 4e5118b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ endif()
7171

7272
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
7373
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion -Wno-sign-conversion -Wno-shorten-64-to-32 -Wno-undefined-var-template -Werror")
74+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-implicit-int-float-conversion")
7475
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # To many superfluous warnings generated with GCC when using -Wconversion (see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752)
7576
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
7677
endif()

0 commit comments

Comments
 (0)