[Webkit-unassigned] [Bug 240553] New: [CMake] Should not GLOB

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 17 17:14:10 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=240553

            Bug ID: 240553
           Summary: [CMake] Should not GLOB
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CMake
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcatanzaro at gnome.org

The CMake documentation explicitly warns against using GLOB at https://cmake.org/cmake/help/latest/command/file.html#filesystem, but we do it anyway in these places:

Source/JavaScriptCore/CMakeLists.txt:file(GLOB JavaScriptCore_SCRIPTS_SOURCES ${JavaScriptCore_SCRIPTS_SOURCES_PATHS})
Source/ThirdParty/capstone/Source/CMakeLists.txt:FILE(GLOB CSTOOL_SRC cstool/*.c)
Source/ThirdParty/libwebrtc/Source/third_party/boringssl/src/CMakeLists.txt:  file(GLOB LIBCXX_SOURCES "util/bot/libcxx/src/*.cpp")
Source/ThirdParty/libwebrtc/Source/third_party/boringssl/src/CMakeLists.txt:  file(GLOB LIBCXXABI_SOURCES "util/bot/libcxxabi/src/*.cpp")
Source/ThirdParty/libwebrtc/Source/third_party/boringssl/src/CMakeLists.txt:    file(GLOB LIBFUZZER_SOURCES "util/bot/libFuzzer/*.cpp")
Source/ThirdParty/libwebrtc/Source/third_party/yasm/cmake/modules/CMakeLists.txt:FILE(GLOB cmakeFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.cmake")
Source/WebCore/platform/gtk/po/CMakeLists.txt:file(GLOB po_files *.po)
Source/WebInspectorUI/CMakeLists.txt:file(GLOB InspectorFilesDependencies
Source/cmake/FindGI.cmake:                file(GLOB src_files LIST_DIRECTORIES FALSE CONFIGURE_DEPENDS "${src}/*.c" "${src}/*.cpp")
Source/cmake/WebKitMacros.cmake:        file(GLOB files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${dir}/*.h)

If somebody is sufficiently bored, fixing these would be good to do.

If there are cases that are difficult to fix, we should at least use CONFIGURE_DEPENDS. It's unlikely that it's ever appropriate to use GLOB without CONFIGURE_DEPENDS.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220518/fb256956/attachment.htm>


More information about the webkit-unassigned mailing list