From e8b1d12c2ffd34f145d82a747946d1f3ce21e174 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 15 Jan 2016 10:43:39 -0500 Subject: [PATCH] Disable warnings C4503 on MSVC for test code C4503 is "decorated name length exceeded", triggered by some heavily templated types. --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12d0b59..fa778c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,8 +243,14 @@ if (NOT ${SPIRV_SKIP_EXECUTABLES}) add_executable(UnitSPIRV ${TEST_SOURCES}) default_compile_options(UnitSPIRV) if(UNIX) - target_compile_options(UnitSPIRV PRIVATE - -Wno-undef) + target_compile_options(UnitSPIRV PRIVATE -Wno-undef) + endif() + if(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC") + # Disable C4503 "decorated name length exceeded" warning, triggered + # by some heavily templated types. + # We don't care much about that in test code. + # Important to do since we have warnings-as-errors. + target_compile_options(UnitSPIRV PRIVATE /wd4503) endif() target_include_directories(UnitSPIRV PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} -- 2.7.4