Skip to content

Commit 561759c

Browse files
committed
Suppress a spurious warning in unit tests and make colors not always output
These color settings mess up the vim quickfix window in newer versions of ubuntu.
1 parent 56b806d commit 561759c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dlib/test/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,14 @@ target_compile_definitions(${target_name} PRIVATE DLIB_FFMPEG_DATA="${DLIB_FFMPE
171171
if (CMAKE_COMPILER_IS_GNUCXX)
172172
# Turn on all warnings, and treat them as errors.
173173
add_compile_options(-W -Wall -Wextra -Wpedantic -Werror)
174-
add_compile_options(-fdiagnostics-color=always)
175174
# I don't care about unused testing functions though. I like to keep them
176175
# around. Don't warn about it.
177176
add_compile_options(-Wno-unused-function)
178177
add_compile_options(-Wno-strict-overflow)
179178
add_compile_options(-Wno-maybe-uninitialized)
180179

181180
if ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11.3.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 11.4.0) OR
182-
(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 14.0.1))
181+
(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.3.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 14.0.1))
183182
# These versions of gcc wrongly yield this warning:
184183
# dlib::row_major_layout::layout<double, 0, 2, dlib::memory_manager_stateless_kernel_1<char> >::data’ with nonzero offset 8 [-Werror=free-nonheap-object]
185184
# 61 | delete [] item;

0 commit comments

Comments
 (0)