mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
cmake: Add set_gnulike_module_compile_flags (#1510)
Factor out a macro to set module-specific compilation flags for GNU-like compilers. This simplifies setting compilation flags per test. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com> Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
86d5ee5414
commit
92285f7c9d
@@ -21,13 +21,7 @@ set(${MODULE_NAME}_SOURCES
|
||||
|
||||
# Make unused variables not fatal in this module; see
|
||||
# https://github.com/KhronosGroup/OpenCL-CTS/issues/1484
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?Clang")
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${${MODULE_NAME}_SOURCES}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "-Wno-error=unused-variable"
|
||||
)
|
||||
endif()
|
||||
set_gnulike_module_compile_flags("-Wno-error=unused-variable")
|
||||
|
||||
include(../../CMakeCommon.txt)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user