Merge pull request #1161 from AbigailBuccaneer/fix/1160

Fix -Wsuggest-override compile errors in tests
1008-fix
krzys_h 2018-05-09 17:10:44 +02:00 committed by GitHub
commit 761694fa05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -63,3 +63,9 @@ add_test(
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/colobot_ut
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
)
# GoogleTest isn't compatible with -Wsuggest-override -Werror:
# see https://github.com/google/googletest/issues/1063
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
target_compile_options(colobot_ut PRIVATE "-Wno-suggest-override")
endif()