cmake: Do not build tests using designated initializers with older GCC.

Submitted by Vinson Lee on March 30, 2019, 6:37 a.m.

Details

Message ID 20190330063755.3837-1-vlee@freedesktop.org
State New
Headers show
Series "cmake: Do not build tests using designated initializers with older GCC." ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Vinson Lee March 30, 2019, 6:37 a.m.
Designated initializers are not supported in older versions of GCC.

tes-gs-max-output.cpp:138: error: expected primary-expression before ‘.’ token
tes-gs-max-output.cpp:139: error: expected primary-expression before ‘.’ token
tes-gs-max-output.cpp:140: error: expected primary-expression before ‘.’ token
tes-gs-max-output.cpp:141: error: expected primary-expression before ‘.’ token
tes-gs-max-output.cpp:142: error: expected primary-expression before ‘.’ token
tes-gs-max-output.cpp:143: error: expected primary-expression before ‘.’ token
tes-gs-max-output.cpp:144: error: expected primary-expression before ‘.’ token

gs-max-output.cpp:98: error: expected primary-expression before ‘.’ token
gs-max-output.cpp:99: error: expected primary-expression before ‘.’ token
gs-max-output.cpp:100: error: expected primary-expression before ‘.’ token
gs-max-output.cpp:101: error: expected primary-expression before ‘.’ token
gs-max-output.cpp:102: error: expected primary-expression before ‘.’ token

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
---
 .../spec/arb_tessellation_shader/CMakeLists.gl.txt |    4 +++-
 .../glsl-1.50/execution/geometry/CMakeLists.gl.txt |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_tessellation_shader/CMakeLists.gl.txt b/tests/spec/arb_tessellation_shader/CMakeLists.gl.txt
index 058a1bc..7975510 100644
--- a/tests/spec/arb_tessellation_shader/CMakeLists.gl.txt
+++ b/tests/spec/arb_tessellation_shader/CMakeLists.gl.txt
@@ -18,6 +18,8 @@  piglit_add_executable (arb_tessellation_shader-invalid-primitive invalid-primiti
 piglit_add_executable (arb_tessellation_shader-minmax minmax.c)
 piglit_add_executable (arb_tessellation_shader-large-uniforms large-uniforms.c)
 piglit_add_executable (arb_tessellation_shader-layout-mismatch layout-mismatch.c)
-piglit_add_executable (arb_tessellation_shader-tes-gs-max-output tes-gs-max-output.cpp)
+if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6))
+	piglit_add_executable (arb_tessellation_shader-tes-gs-max-output tes-gs-max-output.cpp)
+endif()
 
 # vim: ft=cmake:
diff --git a/tests/spec/glsl-1.50/execution/geometry/CMakeLists.gl.txt b/tests/spec/glsl-1.50/execution/geometry/CMakeLists.gl.txt
index c6d21f0..9e496dd 100644
--- a/tests/spec/glsl-1.50/execution/geometry/CMakeLists.gl.txt
+++ b/tests/spec/glsl-1.50/execution/geometry/CMakeLists.gl.txt
@@ -20,7 +20,9 @@  piglit_add_executable (glsl-1.50-gs-mismatch-prim-type gs-mismatch-prim-type.c)
 piglit_add_executable (glsl-1.50-query-gs-prim-types query-gs-prim-types.c)
 piglit_add_executable (glsl-1.50-gs-input-layout-qualifiers gs-input-layout-qualifiers.c)
 piglit_add_executable (glsl-1.50-gs-output-layout-qualifiers gs-output-layout-qualifiers.c)
-piglit_add_executable (glsl-1.50-gs-max-output gs-max-output.cpp)
+if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6))
+	piglit_add_executable (glsl-1.50-gs-max-output gs-max-output.cpp)
+endif()
 piglit_add_executable (glsl-1.50-gs-max-output-components gs-max-output-components.c)
 piglit_add_executable (glsl-1.50-transform-feedback-type-and-size transform-feedback-type-and-size.c)
 piglit_add_executable (glsl-1.50-transform-feedback-vertex-id transform-feedback-vertex-id.c)

Comments