diff options
author | dan sinclair <dj2@everburning.com> | 2018-08-03 15:06:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-03 15:06:07 +0300 |
commit | c8e7bb1d1a77bc4f2ab170d86ee54a4049531549 (patch) | |
tree | b1069417937b396eddf6e9ec73ac5dab9141dacb /CMakeLists.txt | |
parent | 7861df9bb3cd36837d0a6b37f074ba12f9ab63af (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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index af3f29df3..4229fded8 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}) |