summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2018-08-03 08:06:07 -0400
committerGitHub <noreply@github.com>2018-08-03 08:06:07 -0400
commitc8e7bb1d1a77bc4f2ab170d86ee54a4049531549 (patch)
treeb1069417937b396eddf6e9ec73ac5dab9141dacb
parent7861df9bb3cd36837d0a6b37f074ba12f9ab63af (diff)
Fixup Wno-self-assign warning (#1796)
The warning should only be applied for Clang builds, it was accidentally also being included for GCC builds.
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af3f29df..4229fded 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,7 +71,11 @@ if(("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MAT
set(COMPILER_IS_LIKE_GNU TRUE)
endif()
if(${COMPILER_IS_LIKE_GNU})
- set(SPIRV_WARNINGS -Wall -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-self-assign)
+ set(SPIRV_WARNINGS -Wall -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers)
+
+ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+ set(SPIRV_WARNINGS ${SPIRV_WARNINGS} -Wno-self-assign)
+ endif()
option(SPIRV_WARN_EVERYTHING "Enable -Weverything" ${SPIRV_WARN_EVERYTHING})
if(${SPIRV_WARN_EVERYTHING})