[CMake] Properly test if compiler supports compiler flags
[WebKit-https.git] / Source / ThirdParty / woff2 / CMakeLists.txt
index 12c414f..57ac462 100644 (file)
@@ -16,12 +16,12 @@ include_directories("${THIRDPARTY_DIR}/brotli/dec")
 include_directories("${WOFF2_INCLUDE_DIRECTORIES}")
 add_library(woff2 STATIC ${WOFF2_SOURCES})
 target_link_libraries(woff2 brotli)
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(woff2)
 
 if (COMPILER_IS_GCC_OR_CLANG)
-    WEBKIT_ADD_TARGET_PROPERTIES(woff2 COMPILE_FLAGS "-Wno-sign-compare -Wno-unused-variable -Wno-unused-parameter")
-endif ()
-
-if (CMAKE_COMPILER_IS_GNUCXX)
-    WEBKIT_ADD_TARGET_PROPERTIES(woff2 COMPILE_FLAGS "-Wno-unused-but-set-variable")
+    WEBKIT_ADD_TARGET_CXX_FLAGS(woff2 -Wno-cast-align
+                                      -Wno-implicit-fallthrough
+                                      -Wno-sign-compare
+                                      -Wno-unused-variable
+                                      -Wno-unused-parameter
+                                      -Wno-unused-but-set-variable)
 endif ()