diff options
author | Even Rouault <even.rouault@spatialys.com> | 2022-12-29 16:49:27 +0000 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2022-12-29 16:49:27 +0000 |
commit | 9f84326b1394fd9efae2f33bf39218a307d1d87e (patch) | |
tree | c12fb3da59dabdd35eadc3cb9cc4d40e182d3527 | |
parent | 3bde37ac83b0c1a507f5ff2f6944b1e2d44e0381 (diff) | |
parent | bdaf7c7f4f1d15477d402b3d6bc8f2d96a2cb1ee (diff) | |
download | libtiff-git-9f84326b1394fd9efae2f33bf39218a307d1d87e.tar.gz |
Merge branch 'cmake_in_files_formatting_sensitive' into 'master'
Disable clang-formatting for tif_config.h.cmake.in and tiffconf.h.cmake.in...
See merge request libtiff/libtiff!452
-rw-r--r-- | .pre-commit-config.yaml | 11 | ||||
-rw-r--r-- | libtiff/tif_config.h.cmake.in | 8 | ||||
-rw-r--r-- | libtiff/tif_config.h.in | 8 | ||||
-rw-r--r-- | libtiff/tiffconf.h.cmake.in | 8 | ||||
-rw-r--r-- | libtiff/tiffconf.h.in | 8 |
5 files changed, 42 insertions, 1 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dbad088d..9b3e0e0c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,8 +6,17 @@ repos: # tif_fax3sm.c is a generated file # tiffvers.h as well, and its formatting is sensitive for # FindTIFF.cmake to detect the version number + # Furthermore, the .in files are formatting sensitive for + # cmake functions. exclude: > (?x)^( libtiff/tif_fax3sm.c| - libtiff/tiffvers.h + libtiff/tiffvers.h| + libtiff/tiffvers.h.in| + libtiff/tif_config.h| + libtiff/tif_config.h.in| + libtiff/tif_config.h.cmake.in| + libtiff/tiffconf.h| + libtiff/tiffconf.h.in| + libtiff/tiffconf.h.cmake.in ) diff --git a/libtiff/tif_config.h.cmake.in b/libtiff/tif_config.h.cmake.in index 570e4e1b..1547af46 100644 --- a/libtiff/tif_config.h.cmake.in +++ b/libtiff/tif_config.h.cmake.in @@ -1,3 +1,9 @@ +/* clang-format off */ +/* clang-format disabled because CMake scripts are very sensitive to the + * formatting of this file. configure_file variables of type "@VAR@" are + * modified by clang-format and won't be substituted. + */ + /* libtiff/tif_config.h.cmake.in. Not generated, but originated from autoheader. */ /* This file must be kept up-to-date with needed substitutions from libtiff/tif_config.h.in. */ @@ -156,3 +162,5 @@ #else # error "Unsupported size_t size; please submit a bug report" #endif + +/* clang-format on */ diff --git a/libtiff/tif_config.h.in b/libtiff/tif_config.h.in index 8fb78c38..87c08bb7 100644 --- a/libtiff/tif_config.h.in +++ b/libtiff/tif_config.h.in @@ -1,3 +1,9 @@ +/* clang-format off */ +/* clang-format disabled because CMake scripts are very sensitive to the + * formatting of this file. configure_file variables of type "@VAR@" are + * modified by clang-format and won't be substituted. + */ + /* libtiff/tif_config.h.in. Not generated, but originated from autoheader. */ #include "tiffconf.h" @@ -172,3 +178,5 @@ #else # error "Unsupported size_t size; please submit a bug report" #endif + +/* clang-format on */ diff --git a/libtiff/tiffconf.h.cmake.in b/libtiff/tiffconf.h.cmake.in index 5afbf3b2..e3a830d4 100644 --- a/libtiff/tiffconf.h.cmake.in +++ b/libtiff/tiffconf.h.cmake.in @@ -4,6 +4,12 @@ from this file in your programs. */ +/* clang-format off */ +/* clang-format disabled because CMake scripts are very sensitive to the + * formatting of this file. configure_file variables of type "@VAR@" are + * modified by clang-format and won't be substituted. + */ + #ifndef _TIFFCONF_ #define _TIFFCONF_ @@ -125,3 +131,5 @@ #define IPTC_SUPPORT #endif /* _TIFFCONF_ */ + +/* clang-format on */ diff --git a/libtiff/tiffconf.h.in b/libtiff/tiffconf.h.in index 6703eb0e..2a8b03e9 100644 --- a/libtiff/tiffconf.h.in +++ b/libtiff/tiffconf.h.in @@ -4,6 +4,12 @@ from this file in your programs. */ +/* clang-format off */ +/* clang-format disabled because CMake scripts are very sensitive to the + * formatting of this file. configure_file variables of type "@VAR@" are + * modified by clang-format and won't be substituted. + */ + #ifndef _TIFFCONF_ #define _TIFFCONF_ @@ -125,3 +131,5 @@ #define IPTC_SUPPORT #endif /* _TIFFCONF_ */ + +/* clang-format on */ |