diff --git a/dlib/test/CMakeLists.txt b/dlib/test/CMakeLists.txt index 772a6ca20..4154fa0a3 100644 --- a/dlib/test/CMakeLists.txt +++ b/dlib/test/CMakeLists.txt @@ -178,7 +178,8 @@ if (CMAKE_COMPILER_IS_GNUCXX) add_compile_options(-Wno-strict-overflow) add_compile_options(-Wno-maybe-uninitialized) - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11.3.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 11.4.0) + if ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11.3.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 11.4.0) OR + (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 14.0.1)) # These versions of gcc wrongly yield this warning: # dlib::row_major_layout::layout >::data’ with nonzero offset 8 [-Werror=free-nonheap-object] # 61 | delete [] item;