From: Michael J. Spencer Date: Thu, 7 Oct 2010 18:12:54 +0000 (+0000) Subject: CMake: Fix warning in gtest. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1cade330affc01142f43e8c46a8e34278740ad53;p=oota-llvm.git CMake: Fix warning in gtest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115935 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index cb83eab2a5b..b84fa5d6808 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -165,6 +165,8 @@ if( NOT WIN32 ) check_cxx_compiler_flag("-fPIC" SUPPORTS_FPIC_FLAG) endif() +check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG) + include(GetTargetTriple) get_target_triple(LLVM_HOSTTRIPLE) diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt index 70685463014..4400b38234e 100644 --- a/utils/unittest/CMakeLists.txt +++ b/utils/unittest/CMakeLists.txt @@ -20,6 +20,10 @@ if(WIN32) add_definitions(-DGTEST_OS_WINDOWS=1) endif() +if(SUPPORTS_NO_VARIADIC_MACROS_FLAG) + add_definitions("-Wno-variadic-macros") +endif() + add_llvm_library(gtest googletest/gtest.cc googletest/gtest-death-test.cc