Skip to content

Commit de7a74c

Browse files
committed
Disable -Wunused-lambda-capture which complains about nonsense sometimes
1 parent 78c402b commit de7a74c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
207207
endif()
208208
endif()
209209

210+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND NOT APPLE)
211+
list(APPEND warning_flags -Wno-unused-lambda-capture)
212+
endif()
213+
210214
if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
211215
list(APPEND warning_flags -Werror)
212216
endif()

0 commit comments

Comments
 (0)