diff --git a/projects/clr/hipamd/rocclr/CMakeLists.txt b/projects/clr/hipamd/rocclr/CMakeLists.txt index 21ce5b1c58..8f1d7ef5c0 100755 --- a/projects/clr/hipamd/rocclr/CMakeLists.txt +++ b/projects/clr/hipamd/rocclr/CMakeLists.txt @@ -21,8 +21,17 @@ if(CMAKE_BUILD_TYPE MATCHES "^Debug$") add_definitions(-DDEBUG) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - add_compile_options("-Wno-ignored-attributes") +if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR + (CMAKE_${COMPILER}_COMPILER_ID MATCHES "Clang")) + add_definitions( + # Enabling -Wextra or -pedantic will cause + # thousands of warnings. Keep things simple for now. + -Wall + # This one seems impossible to fix for now. + # There are hundreds of instances of unused vars/functions + # throughout the code base. + -Wno-unused-variable + -Wno-unused-function) endif() set(USE_PROF_API "1")