From a3a3bf914495d255827f123f3d3064192df4910f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Fri, 28 Jul 2017 21:50:04 +0800 Subject: [PATCH] Externals/glslang: Silent even more warnings * -Wno-unused-but-set-variable: only set this flag with gcc, otherwise clang will issue warnings about the warning option being unknown :) (-Wunknown-warning-option) * -Wmissing-variable-declarations: clang warns about missing extern declarations for non-static variables. --- Externals/glslang/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Externals/glslang/CMakeLists.txt b/Externals/glslang/CMakeLists.txt index 3439a55dda..f288020542 100644 --- a/Externals/glslang/CMakeLists.txt +++ b/Externals/glslang/CMakeLists.txt @@ -60,7 +60,11 @@ add_compile_options(-Wno-reorder) add_compile_options(-Wno-sign-compare) add_compile_options(-Wno-parentheses) add_compile_options(-Wno-unused-variable) -add_compile_options(-Wno-unused-but-set-variable) +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + add_compile_options(-Wno-unused-but-set-variable) +elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + add_compile_options(-Wno-missing-variable-declarations) +endif() endif() add_library(glslang STATIC ${SRCS})