mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Disable warnings for GTest
Warnings for GTest broke the build because GTest turns warnings into errors, which is undesirable if GTest is just used as a dependency. See also https://github.com/google/googletest/issues/1373.
This commit is contained in:
parent
32f919eee0
commit
00154bd280
|
@ -316,7 +316,10 @@ if(NOT(GTEST_FOUND) AND DOWNLOAD_GTEST)
|
|||
|
||||
if(MSVC)
|
||||
foreach(target gtest)
|
||||
target_compile_options(${target} PRIVATE $<$<NOT:${DBG}>:/MT> $<${DBG}:/MTd>)
|
||||
# `/w` disables all warnings. This is needed because `gtest` enables
|
||||
# `/WX` (equivalent of `-Werror`) for some reason, breaking builds
|
||||
# when MSVS adds new warnings.
|
||||
target_compile_options(${target} PRIVATE $<$<NOT:${DBG}>:/MT> $<${DBG}:/MTd> /w)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in a new issue