forked from OSchip/llvm-project
[gtest] Fix the way we disable a warning for unittests.
I somehow wrote this fix and then lost it prior to commit. Really sorry about the noise. This should fix some issues with hacking add_definition to do things with warning flags. llvm-svn: 291033
This commit is contained in:
parent
e5b41f7ccf
commit
dd9c27b3bf
|
@ -1014,6 +1014,10 @@ function(add_unittest test_suite test_name)
|
|||
if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)
|
||||
list(APPEND LLVM_COMPILE_FLAGS "-Wno-variadic-macros")
|
||||
endif ()
|
||||
# Some parts of gtest rely on this GNU extension, don't warn on it.
|
||||
if(SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG)
|
||||
list(APPEND LLVM_COMPILE_FLAGS "-Wno-gnu-zero-variadic-macro-arguments")
|
||||
endif()
|
||||
|
||||
set(LLVM_REQUIRES_RTTI OFF)
|
||||
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
add_custom_target(UnitTests)
|
||||
set_target_properties(UnitTests PROPERTIES FOLDER "Tests")
|
||||
|
||||
# Some parts of gtest rely on this GNU extension, don't warn on it.
|
||||
if(SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG)
|
||||
add_definitions("-Wno-gnu-zero-variadic-macro-arguments")
|
||||
endif()
|
||||
|
||||
function(add_llvm_unittest test_dirname)
|
||||
add_unittest(UnitTests ${test_dirname} ${ARGN})
|
||||
endfunction()
|
||||
|
|
Loading…
Reference in New Issue