Correct clang build error.

Clang now warns about set but unused variables.  It also now
recognizes -Wno-error=unused-but-set-variable so this patch moves
that option back to the general options list.

Change-Id: Id800e87eb688b9441b14380e2246ad586179f31a


[ROCm/ROCR-Runtime commit: 26808295f8]
This commit is contained in:
Sean Keely
2021-06-23 15:04:58 -05:00
vanhempi d139055431
commit 4f2d6f763b
@@ -138,13 +138,13 @@ target_include_directories( ${CORE_RUNTIME_TARGET}
set_property(TARGET ${CORE_RUNTIME_TARGET} PROPERTY INSTALL_RPATH "$ORIGIN;$ORIGIN/../../lib;$ORIGIN/../../lib64;$ORIGIN/../lib64" )
## ------------------------- Linux Compiler and Linker options -------------------------
set ( HSA_CXX_FLAGS ${HSA_COMMON_CXX_FLAGS} -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=missing-braces -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -Wno-error=unused-variable -Wno-error=unused-function )
set ( HSA_CXX_FLAGS ${HSA_COMMON_CXX_FLAGS} -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=missing-braces -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -Wno-error=unused-variable -Wno-error=unused-function -Wno-error=unused-but-set-variable )
## Extra image settings - audit!
set ( HSA_CXX_FLAGS ${HSA_CXX_FLAGS} -Wno-deprecated-declarations )
if ( CMAKE_COMPILER_IS_GNUCXX )
set ( HSA_CXX_FLAGS ${HSA_CXX_FLAGS} -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized)
set ( HSA_CXX_FLAGS ${HSA_CXX_FLAGS} -Wno-error=maybe-uninitialized)
endif ()
if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set ( HSA_CXX_FLAGS ${HSA_CXX_FLAGS} -Wno-error=self-assign)