diff options
author | Michael Dickens <mlk@alum.mit.edu> | 2019-12-16 19:23:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-12-18 10:45:08 (GMT) |
commit | e8dbe4bba10dff2ac865b145830c931d1154d8fc (patch) | |
tree | 64a220e9da79f74838657132ef7514c4389c1eb5 | |
parent | 4771c4e447c88a0e6a361d98c2c6f44ac7746ad3 (diff) | |
download | CMake-e8dbe4bba10dff2ac865b145830c931d1154d8fc.zip CMake-e8dbe4bba10dff2ac865b145830c931d1154d8fc.tar.gz CMake-e8dbe4bba10dff2ac865b145830c931d1154d8fc.tar.bz2 |
Tests: Fix testCTestResourceSpec struct initialization for some compilers
Some compilers do not like the nested `{{{}}}` member initialization
syntax, so use just `{}`. GCC 4.8 warns about the latter, so add a
suppression.
Fixes: #20097
-rw-r--r-- | CTestCustom.cmake.in | 1 | ||||
-rw-r--r-- | Tests/CMakeLib/testCTestResourceSpec.cxx | 73 |
2 files changed, 37 insertions, 37 deletions
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 823ee3c..d3ab9d3 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -49,6 +49,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "WarningMessagesDialog\\.cxx" "warning.*directory name.*CMake-Xcode.*/bin/.*does not exist.*" "stl_deque.h:1051" + "Tests/CMakeLib/testCTestResourceSpec.cxx:.*warning: missing initializer for member.*cmCTestResourceSpec::.*" # GCC 4.8 disagrees with later compilers on C++11 initializer list conversion "(Lexer|Parser).*warning.*conversion.*may (alter its value|change the sign)" "(Lexer|Parser).*warning.*(statement is unreachable|will never be executed)" "(Lexer|Parser).*warning.*variable.*was set but never used" diff --git a/Tests/CMakeLib/testCTestResourceSpec.cxx b/Tests/CMakeLib/testCTestResourceSpec.cxx index b69003d..99bee56 100644 --- a/Tests/CMakeLib/testCTestResourceSpec.cxx +++ b/Tests/CMakeLib/testCTestResourceSpec.cxx @@ -21,43 +21,42 @@ static const std::vector<ExpectedSpec> expectedResourceSpecs = { {"threads", { }}, }}}}, - {"spec2.json", true, {{{ - }}}}, - {"spec3.json", false, {{{}}}}, - {"spec4.json", false, {{{}}}}, - {"spec5.json", false, {{{}}}}, - {"spec6.json", false, {{{}}}}, - {"spec7.json", false, {{{}}}}, - {"spec8.json", false, {{{}}}}, - {"spec9.json", false, {{{}}}}, - {"spec10.json", false, {{{}}}}, - {"spec11.json", false, {{{}}}}, - {"spec12.json", false, {{{}}}}, - {"spec13.json", false, {{{}}}}, - {"spec14.json", true, {{{}}}}, - {"spec15.json", true, {{{}}}}, - {"spec16.json", true, {{{}}}}, - {"spec17.json", false, {{{}}}}, - {"spec18.json", false, {{{}}}}, - {"spec19.json", false, {{{}}}}, - {"spec20.json", true, {{{}}}}, - {"spec21.json", false, {{{}}}}, - {"spec22.json", false, {{{}}}}, - {"spec23.json", false, {{{}}}}, - {"spec24.json", false, {{{}}}}, - {"spec25.json", false, {{{}}}}, - {"spec26.json", false, {{{}}}}, - {"spec27.json", false, {{{}}}}, - {"spec28.json", false, {{{}}}}, - {"spec29.json", false, {{{}}}}, - {"spec30.json", false, {{{}}}}, - {"spec31.json", false, {{{}}}}, - {"spec32.json", false, {{{}}}}, - {"spec33.json", false, {{{}}}}, - {"spec34.json", false, {{{}}}}, - {"spec35.json", false, {{{}}}}, - {"spec36.json", false, {{{}}}}, - {"noexist.json", false, {{{}}}}, + {"spec2.json", true, {}}, + {"spec3.json", false, {}}, + {"spec4.json", false, {}}, + {"spec5.json", false, {}}, + {"spec6.json", false, {}}, + {"spec7.json", false, {}}, + {"spec8.json", false, {}}, + {"spec9.json", false, {}}, + {"spec10.json", false, {}}, + {"spec11.json", false, {}}, + {"spec12.json", false, {}}, + {"spec13.json", false, {}}, + {"spec14.json", true, {}}, + {"spec15.json", true, {}}, + {"spec16.json", true, {}}, + {"spec17.json", false, {}}, + {"spec18.json", false, {}}, + {"spec19.json", false, {}}, + {"spec20.json", true, {}}, + {"spec21.json", false, {}}, + {"spec22.json", false, {}}, + {"spec23.json", false, {}}, + {"spec24.json", false, {}}, + {"spec25.json", false, {}}, + {"spec26.json", false, {}}, + {"spec27.json", false, {}}, + {"spec28.json", false, {}}, + {"spec29.json", false, {}}, + {"spec30.json", false, {}}, + {"spec31.json", false, {}}, + {"spec32.json", false, {}}, + {"spec33.json", false, {}}, + {"spec34.json", false, {}}, + {"spec35.json", false, {}}, + {"spec36.json", false, {}}, + {"noexist.json", false, {}}, /* clang-format on */ }; |