]> git.pld-linux.org Git - packages/OpenImageIO.git/blobdiff - no-clang-format.patch
- started uodate to 2.3.12.0, removed obsolete patches
[packages/OpenImageIO.git] / no-clang-format.patch
index beee0313571e63fc6b8d951e33500a3bbb252d99..a474243ca338c2e3c8f31a58ab9947081000db0b 100644 (file)
@@ -1,36 +1,57 @@
-diff -urNp -x '*.orig' oiio-Release-2.0.13.org/src/cmake/compiler.cmake oiio-Release-2.0.13/src/cmake/compiler.cmake
---- oiio-Release-2.0.13.org/src/cmake/compiler.cmake   2019-12-03 23:28:14.000000000 +0100
-+++ oiio-Release-2.0.13/src/cmake/compiler.cmake       2021-03-07 10:22:00.460540342 +0100
-@@ -338,32 +338,6 @@ if (CLANG_TIDY)
-     # Hint: run with CLANG_TIDY_ARGS=-list-checks to list all the checks
- endif ()
+--- oiio-2.3.12.0/src/cmake/compiler.cmake.orig        2022-02-05 17:02:29.480576995 +0100
++++ oiio-2.3.12.0/src/cmake/compiler.cmake     2022-02-05 17:03:59.121664048 +0100
+@@ -432,54 +432,6 @@
  
--# clang-format
--find_program (CLANG_FORMAT_EXE
--              NAMES clang-format bin/clang-format
--              HINTS ${CLANG_FORMAT_EXE_HINT} ENV CLANG_FORMAT_EXE_HINT
--                    ENV LLVM_DIRECTORY
--              NO_DEFAULT_PATH
--              DOC "Path to clang-format executable")
--find_program (CLANG_FORMAT_EXE NAMES clang-format bin/clang-format)
--if (CLANG_FORMAT_EXE)
--    message (STATUS "clang-format found: ${CLANG_FORMAT_EXE}")
--    # Start with the list of files to include when formatting...
--    file (GLOB_RECURSE FILES_TO_FORMAT ${CLANG_FORMAT_INCLUDES})
--    # ... then process any list of excludes we are given
--    foreach (_pat ${CLANG_FORMAT_EXCLUDES})
--        file (GLOB_RECURSE _excl ${_pat})
--        list (REMOVE_ITEM FILES_TO_FORMAT ${_excl})
--    endforeach ()
--    #message (STATUS "clang-format file list: ${FILES_TO_FORMAT}")
--    file (COPY ${CMAKE_CURRENT_SOURCE_DIR}/.clang-format
--          DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
--    add_custom_target (clang-format
--        COMMAND "${CLANG_FORMAT_EXE}" -i -style=file ${FILES_TO_FORMAT} )
--else ()
--    message (STATUS "clang-format not found.")
+ ###########################################################################
+-# clang-format options
+-#
+-# clang-format is a source code reformatter that is part of the LLVM tools.
+-# It can be used to check adherence to project code formatting rules and
+-# correct any deviations. If clang-format is found on the system, a
+-# "clang-format" build target will trigger a reformatting.
+-#
+-# Note: skip all of this checking, setup, and cmake-format target if this
+-# is being built as a subproject.
+-if (PROJECT_IS_TOP_LEVEL)
+-    set (CLANG_FORMAT_EXE_HINT "" CACHE PATH "clang-format executable's directory (will search if not specified")
+-    set (CLANG_FORMAT_INCLUDES "src/*.h" "src/*.cpp"
+-        CACHE STRING "Glob patterns to include for clang-format")
+-    set (CLANG_FORMAT_EXCLUDES "*pugixml*" "*SHA1*" "*/farmhash.cpp"
+-                               "src/dpx.imageio/libdpx/*"
+-                               "src/cineon.imageio/libcineon/*"
+-                               "src/dds.imageio/squish/*"
+-                               "src/gif.imageio/gif.h"
+-                               "src/hdr.imageio/rgbe.cpp"
+-                               "src/libutil/stb_sprintf.h"
+-         CACHE STRING "Glob patterns to exclude for clang-format")
+-    find_program (CLANG_FORMAT_EXE
+-                  NAMES clang-format bin/clang-format
+-                  HINTS ${CLANG_FORMAT_EXE_HINT} ENV CLANG_FORMAT_EXE_HINT
+-                        ENV LLVM_DIRECTORY
+-                  NO_DEFAULT_PATH
+-                  DOC "Path to clang-format executable")
+-    find_program (CLANG_FORMAT_EXE NAMES clang-format bin/clang-format)
+-    if (CLANG_FORMAT_EXE)
+-        message (STATUS "clang-format found: ${CLANG_FORMAT_EXE}")
+-        # Start with the list of files to include when formatting...
+-        file (GLOB_RECURSE FILES_TO_FORMAT ${CLANG_FORMAT_INCLUDES})
+-        # ... then process any list of excludes we are given
+-        foreach (_pat ${CLANG_FORMAT_EXCLUDES})
+-            file (GLOB_RECURSE _excl ${_pat})
+-            list (REMOVE_ITEM FILES_TO_FORMAT ${_excl})
+-        endforeach ()
+-        #message (STATUS "clang-format file list: ${FILES_TO_FORMAT}")
+-        file (COPY ${CMAKE_CURRENT_SOURCE_DIR}/.clang-format
+-              DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+-        add_custom_target (clang-format
+-            COMMAND "${CLANG_FORMAT_EXE}" -i -style=file ${FILES_TO_FORMAT} )
+-    else ()
+-        message (STATUS "clang-format not found.")
+-    endif ()
 -endif ()
 -
- if (EXTRA_CPP_ARGS)
-     message (STATUS "Extra C++ args: ${EXTRA_CPP_ARGS}")
+-###########################################################################
+ # Another way to sneak in custom compiler and DSO linking flags.
+ #
+ set (EXTRA_CPP_ARGS "" CACHE STRING "Extra C++ command line definitions")
This page took 0.094082 seconds and 4 git commands to generate.