[CMAKE] Some options are only supported by GCC, don't use them for clang
[reactos.git] / drivers / filesystems / reiserfs / CMakeLists.txt
index b921bbf..84e680e 100644 (file)
@@ -82,7 +82,6 @@ if(USE_CLANG_CL OR (NOT MSVC))
     target_compile_options(reiserfs PRIVATE -Wno-missing-braces -Wno-pointer-sign)
     target_compile_options(reiserfs PRIVATE -Wno-unused-function -Wno-unused-variable)
     if(NOT USE_CLANG_CL)
-        target_compile_options(reiserfs PRIVATE -Wno-unused-but-set-variable)
         target_compile_definitions(reiserfs PRIVATE __GCC__)
     endif()
 else()
@@ -92,6 +91,10 @@ else()
     target_compile_options(reiserfs PRIVATE /wd4189 /wd4142 /wd4101)
 endif()
 
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+    target_compile_options(reiserfs PRIVATE -Wno-unused-but-set-variable)
+endif()
+
 target_link_libraries(reiserfs memcmp ${PSEH_LIB})
 add_definitions(-D__KERNEL__ -D_CRT_NO_POSIX_ERROR_CODES)
 set_module_type(reiserfs kernelmodedriver)