mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
[NFC] cmake: do not suppress -Wunused-but-set-variable globally (#1723)
Only disable `-Wunused-but-set-variable` for tests that do not compile cleanly with this warning enabled. This re-enables the warning for most other tests, so that it can catch any new occurrences. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
06c0c99c2e
commit
1884042f5d
@@ -105,7 +105,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?Clang"
|
|||||||
add_cxx_flag_if_supported(-Wall)
|
add_cxx_flag_if_supported(-Wall)
|
||||||
# Suppress warnings that currently trigger on the code base.
|
# Suppress warnings that currently trigger on the code base.
|
||||||
# This list should shrink over time when warnings are fixed.
|
# This list should shrink over time when warnings are fixed.
|
||||||
add_cxx_flag_if_supported(-Wno-unused-but-set-variable)
|
|
||||||
add_cxx_flag_if_supported(-Wno-sometimes-uninitialized)
|
add_cxx_flag_if_supported(-Wno-sometimes-uninitialized)
|
||||||
add_cxx_flag_if_supported(-Wno-sign-compare)
|
add_cxx_flag_if_supported(-Wno-sign-compare)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -70,4 +70,6 @@ if(APPLE)
|
|||||||
list(APPEND ${MODULE_NAME}_SOURCES test_queue_priority.cpp)
|
list(APPEND ${MODULE_NAME}_SOURCES test_queue_priority.cpp)
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
|
set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")
|
||||||
|
|
||||||
include(../CMakeCommon.txt)
|
include(../CMakeCommon.txt)
|
||||||
|
|||||||
@@ -16,4 +16,6 @@ set_source_files_properties(
|
|||||||
COMPILE_FLAGS -march=i686)
|
COMPILE_FLAGS -march=i686)
|
||||||
endif(NOT CMAKE_CL_64 AND NOT MSVC AND NOT ANDROID)
|
endif(NOT CMAKE_CL_64 AND NOT MSVC AND NOT ANDROID)
|
||||||
|
|
||||||
|
set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")
|
||||||
|
|
||||||
include(../CMakeCommon.txt)
|
include(../CMakeCommon.txt)
|
||||||
|
|||||||
@@ -5,4 +5,6 @@ set(${MODULE_NAME}_SOURCES
|
|||||||
test_device_timer.cpp
|
test_device_timer.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")
|
||||||
|
|
||||||
include(../CMakeCommon.txt)
|
include(../CMakeCommon.txt)
|
||||||
|
|||||||
@@ -15,5 +15,7 @@ set(${MODULE_NAME}_SOURCES
|
|||||||
../common.cpp
|
../common.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")
|
||||||
|
|
||||||
include(../../CMakeCommon.txt)
|
include(../../CMakeCommon.txt)
|
||||||
|
|
||||||
|
|||||||
@@ -11,5 +11,7 @@ set(${MODULE_NAME}_SOURCES
|
|||||||
../common.cpp
|
../common.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")
|
||||||
|
|
||||||
include(../../CMakeCommon.txt)
|
include(../../CMakeCommon.txt)
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ set(${MODULE_NAME}_SOURCES
|
|||||||
|
|
||||||
# Make unused variables not fatal in this module; see
|
# Make unused variables not fatal in this module; see
|
||||||
# https://github.com/KhronosGroup/OpenCL-CTS/issues/1484
|
# https://github.com/KhronosGroup/OpenCL-CTS/issues/1484
|
||||||
set_gnulike_module_compile_flags("-Wno-error=unused-variable")
|
set_gnulike_module_compile_flags("-Wno-error=unused-variable -Wno-unused-but-set-variable")
|
||||||
|
|
||||||
include(../../CMakeCommon.txt)
|
include(../../CMakeCommon.txt)
|
||||||
|
|
||||||
|
|||||||
@@ -6,4 +6,6 @@ set(${MODULE_NAME}_SOURCES
|
|||||||
mem_host_image.cpp
|
mem_host_image.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")
|
||||||
|
|
||||||
include(../CMakeCommon.txt)
|
include(../CMakeCommon.txt)
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ set(${MODULE_NAME}_SOURCES
|
|||||||
tools.cpp
|
tools.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")
|
||||||
|
|
||||||
include(../CMakeCommon.txt)
|
include(../CMakeCommon.txt)
|
||||||
|
|
||||||
# end of file #
|
# end of file #
|
||||||
|
|||||||
Reference in New Issue
Block a user