File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,17 @@ if (CMAKE_COMPILER_IS_GNUCXX)
187187 add_compile_options (-Wno-free-nonheap-object)
188188 endif ()
189189
190+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 14.0.1)
191+ # These versions of gcc wrongly yield this warning:
192+ # In member function ‘allocate_array’,
193+ # inlined from ‘set_max_size’ at /builddir/build/BUILD/dlib-19.24.4/dlib/../dlib/svm/../matrix/../array/array_kernel.h:438:59,
194+ # inlined from ‘push_back.constprop’ at /builddir/build/BUILD/dlib-19.24.4/dlib/../dlib/svm/../matrix/../array/array_kernel.h:769:30:
195+ # /builddir/build/BUILD/dlib-19.24.4/dlib/../dlib/svm/../memory_manager_stateless/memory_manager_stateless_kernel_1.h:54:24: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
196+ # 54 | return new T[size];
197+ # when compiling dlib example programs that most definitely do not ask for such allocations.
198+ add_compile_options (-Wno-alloc-size-larger-than)
199+ endif ()
200+
190201 if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0" )
191202 # strip debug symbols to make the binary smaller
192203 target_link_options (${target_name} PRIVATE $<$<CONFIG:RELEASE>:-s>)
You can’t perform that action at this time.
0 commit comments