[GTK][CMake] Add support for building with Clang
[WebKit-https.git] / Source / PlatformGTK.cmake
index 5a55c6202ef91c0b3b5defe829b04e583596335d..afe27fd7c25513d069a8e3376b3854e8f255ab62 100644 (file)
@@ -33,7 +33,7 @@ macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
     add_custom_command(
         OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
         DEPENDS ${DocumentationDependencies}
-        COMMAND CC="${CMAKE_C_COMPILER}" ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
+        COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
         COMMAND touch ${_stamp_name}
         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
     )