Skip to content

Commit

Permalink
Fixup Wno-self-assign warning (KhronosGroup#1796)
Browse files Browse the repository at this point in the history
The warning should only be applied for Clang builds, it was accidentally
also being included for GCC builds.
  • Loading branch information
dj2 authored Aug 3, 2018
1 parent 7861df9 commit c8e7bb1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit c8e7bb1

Please sign in to comment.