Title: [257984] releases/WebKitGTK/webkit-2.28
Revision
257984
Author
carlo...@webkit.org
Date
2020-03-06 06:28:11 -0800 (Fri, 06 Mar 2020)

Log Message

Merge r257649 - Fix issue in cmake build for checking ccache
https://bugs.webkit.org/show_bug.cgi?id=208377

Reviewed by Carlos Alberto Lopez Perez.

If either of the "readlink" or "which" commands fail when looking for the ccache prefix
the output variables will be empty and an invalid _expression_ will be provided to CMake.
e.g. we will get something like:
if ("0" "EQUAL" "0" "AND" "1" "EQUAL" "0" "AND" "STREQUAL" "/usr/local/bin/ccache")

The fix is to wrap the output variables in the quotes when unboxing them in the if.

* Source/cmake/WebKitCCache.cmake:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.28/ChangeLog (257983 => 257984)


--- releases/WebKitGTK/webkit-2.28/ChangeLog	2020-03-06 14:28:07 UTC (rev 257983)
+++ releases/WebKitGTK/webkit-2.28/ChangeLog	2020-03-06 14:28:11 UTC (rev 257984)
@@ -1,3 +1,19 @@
+2020-02-28  Keith Miller  <keith_mil...@apple.com>
+
+        Fix issue in cmake build for checking ccache
+        https://bugs.webkit.org/show_bug.cgi?id=208377
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        If either of the "readlink" or "which" commands fail when looking for the ccache prefix
+        the output variables will be empty and an invalid _expression_ will be provided to CMake.
+        e.g. we will get something like:
+        if ("0" "EQUAL" "0" "AND" "1" "EQUAL" "0" "AND" "STREQUAL" "/usr/local/bin/ccache")
+
+        The fix is to wrap the output variables in the quotes when unboxing them in the if.
+
+        * Source/cmake/WebKitCCache.cmake:
+
 2020-02-27  Adrian Perez de Castro  <ape...@igalia.com>
 
         Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.27.91 release

Modified: releases/WebKitGTK/webkit-2.28/Source/cmake/WebKitCCache.cmake (257983 => 257984)


--- releases/WebKitGTK/webkit-2.28/Source/cmake/WebKitCCache.cmake	2020-03-06 14:28:07 UTC (rev 257983)
+++ releases/WebKitGTK/webkit-2.28/Source/cmake/WebKitCCache.cmake	2020-03-06 14:28:11 UTC (rev 257984)
@@ -11,9 +11,10 @@
             if (NOT DEFINED ENV{CCACHE_SLOPPINESS})
                 set(ENV{CCACHE_SLOPPINESS} time_macros)
             endif ()
+            # FIXME: readlink -f isn't supported on macOS. https://bugs.webkit.org/show_bug.cgi?id=208379
             execute_process(COMMAND readlink -f ${CMAKE_CXX_COMPILER} RESULT_VARIABLE READLINK_RETCODE OUTPUT_VARIABLE REAL_CXX_PATH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
             execute_process(COMMAND which ${CCACHE_FOUND} RESULT_VARIABLE WHICH_RETCODE OUTPUT_VARIABLE REAL_CCACHE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
-            if (${WHICH_RETCODE} EQUAL 0 AND ${READLINK_RETCODE} EQUAL 0 AND ${REAL_CXX_PATH} STREQUAL ${REAL_CCACHE_PATH})
+            if (${WHICH_RETCODE} EQUAL 0 AND ${READLINK_RETCODE} EQUAL 0 AND "${REAL_CXX_PATH}" STREQUAL "${REAL_CCACHE_PATH}")
                 message(STATUS "Enabling ccache: Compiler path already pointing to ccache. Not setting ccache prefix.")
             else ()
                 message(STATUS "Enabling ccache: Setting ccache prefix for compiler.")
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to