"checkit_tiff" is an incredibly fast conformance checker for baseline TIFFs (with various extensions), see http://andreas-romeyke.de
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1 个月前
1 个月前
1 个月前
1 个月前
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # You need an installed cmake
  2. ########################################################
  3. # compiling under linux
  4. # HINT: use "-fstack-check" if you expect highly corrupted TIFF-files
  5. ########################################################
  6. mkdir build
  7. cd build
  8. cmake ../src/ -DCMAKE_C_FLAGS="-W -Wall -Wextra -ansi -pedantic -O3 -flto -Wno-unused-function -fstack-check -fstack-protector-strong -Wformat -Werror=format-security"
  9. make
  10. ###
  11. # if you want to allow preferred CMM type "LINO", you should use the cmake-call
  12. # cmake ../src/ -DCMAKE_C_FLAGS="-DALLOW_CMMTYPE_LINO -W -Wall -Wextra -ansi -pedantic -O2 -Wno-unused-function"
  13. ########################################################
  14. # alternatively for windows crosscompiling using mingw
  15. ########################################################
  16. #mkdir build
  17. #cd build
  18. #cmake -DCMAKE_TOOLCHAIN_FILE=../src/toolchain-mingw32.cmake -DPCRE_LIBRARY=~/Downloads/pcre-8.37/.libs/libpcre.a -DPCRE_INCLUDE_DIR=~/Downloads/pcre-8.37/ ../src/
  19. #make
  20. #
  21. ########################################################
  22. # examples/options to set specific C-compiler or Flags
  23. ########################################################
  24. # cmake ../src/ -DCMAKE_C_COMPILER=$(which gcc)
  25. # cmake ../src/ -DCMAKE_C_FLAGS="-O0 -p -g"
  26. # cmake ../src/ -DCMAKE_C_COMPILER=$(which clang-7) -DCMAKE_C_FLAGS="-Oz -pedantic"
  27. #
  28. ########################################################
  29. # example SANITIZE options
  30. ########################################################
  31. #
  32. # SANITIZE with clang++
  33. # cmake ../src/ -DCMAKE_C_COMPILER=/usr/bin/clang-8 -DCMAKE_C_FLAGS="-O0 -g -fsanitize=address -fno-omit-frame-pointer"
  34. # make
  35. # ASAN_OPTIONS=detect_leaks=1 ./checkit_tiff ...
  36. #
  37. # SANITIZE with gcc
  38. # cmake ../src/ -DCMAKE_C_FLAGS="-Og -g -fsanitize=address -fsanitize=undefined -fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null -fsanitize=return -fsanitize=signed-integer-overflow-fno-omit-frame-pointer"
  39. # AFL_HARDEN=1 make
  40. # ASAN_OPTIONS=detect_leaks=1 ./checkit_tiff ...
  41. #
  42. #
  43. ########################################################
  44. # example STATIC options
  45. ########################################################
  46. #
  47. # cmake ../src/ -DSTATIC=1 -DCMAKE_C_FLAGS="-O3 -s -flto -Wno-unused-function -fstack-check -fstack-protector-strong -Wformat -Werror=format-security"
  48. #
  49. ########################################################
  50. # example CLANG-TIDY
  51. ########################################################
  52. # cmake ../src/ -DCMAKE_C_CLANG_TIDY:STRING="clang-tidy;-checks=-*,readability-*" -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCMAKE_C_COMPILER=/usr/bin/clang-8 -DCMAKE_C_FLAGS="-O0 -g -fsanitize=address -fno-omit-frame-pointer"
  53. # make
  54. # run-clang-tidy-8.py -clang-tidy-binary /usr/bin/clang-tidy-8
  55. #
  56. #
  57. ########################################################
  58. # Testing
  59. ########################################################
  60. # you need perl with Test::More
  61. # change to directory "t/"
  62. # run "perl -I ./ *.t"
  63. #