Skip to content

Commit

Permalink
Disable -Wgnuzero-variadic-macro-arguments for non-Windows platforms
Browse files Browse the repository at this point in the history
This is due to a bug in Google Test that is causing non-Windows builds to fail.
  • Loading branch information
cugone committed Mar 23, 2020
1 parent 56d1f0e commit 3635a8a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/StringUtils.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ TEST(String, stringFromChar)

}

#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#elif defined(__clang__) || defined(__APPLE__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#endif

template<typename T>
class StringFromSignedIntegerTest : public ::testing::Test
Expand Down Expand Up @@ -183,6 +190,13 @@ TYPED_TEST(StringFromFloatingPointTest, StringFromFloatingPointTestEdgeCases)
EXPECT_EQ("1.500000"s, NAS2D::stringFrom(TypeParam{1.5}));
}

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__) || defined(__APPLE__)
#pragma clang diagnostic pop
#endif



TEST(String, stringToFromRoundtrip)
{
Expand Down

0 comments on commit 3635a8a

Please sign in to comment.