mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Allow building with cmake --compile-no-warning-as-error. (#2401)
In CMake 3.24+, there is built-in support for adding -Werror that does not require adding -Werror explicitly, and allows it to be downgraded to a warning if the user wants that. Use this, to account for warnings that have false positives.
This commit is contained in:
@@ -6,6 +6,7 @@ set(VULKAN_WRAPPER_SOURCES
|
||||
)
|
||||
|
||||
# needed by Vulkan wrapper to compile
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
||||
add_cxx_flag_if_supported(-Wmisleading-indentation)
|
||||
add_cxx_flag_if_supported(-Wno-narrowing)
|
||||
add_cxx_flag_if_supported(-Wno-format)
|
||||
|
||||
@@ -17,6 +17,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories (${CLConform_INCLUDE_DIR})
|
||||
|
||||
list(APPEND CLConform_LIBRARIES vulkan_wrapper)
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
||||
set(CMAKE_CXX_FLAGS "-fpermissive")
|
||||
|
||||
include_directories("../../common/vulkan_wrapper")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
set (MODULE_NAME VULKAN)
|
||||
|
||||
list(APPEND CLConform_LIBRARIES vulkan_wrapper)
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
||||
set(CMAKE_CXX_FLAGS "-fpermissive")
|
||||
if(WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_USE_PLATFORM_WIN32_KHR")
|
||||
|
||||
Reference in New Issue
Block a user