"checkit_tiff" is an incredibly fast conformance checker for baseline TIFFs (with various extensions), see http://andreas-romeyke.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.9KB

# You need an installed cmake
########################################################
# compiling under linux
# HINT: use "-fstack-check" if you expect highly corrupted TIFF-files
########################################################
mkdir build
cd build
cmake ../src/ -DCMAKE_C_FLAGS="-W -Wall -Wextra -ansi -pedantic -O3 -Wno-unused-function -fstack-check"
make
###
# if you want to allow preferred CMM type "LINO", you should use the cmake-call
# cmake ../src/ -DCMAKE_C_FLAGS="-DALLOW_CMMTYPE_LINO -W -Wall -Wextra -ansi -pedantic -O2 -Wno-unused-function"

########################################################
# alternatively for windows crosscompiling using mingw
########################################################
#mkdir build
#cd build
#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/
#make
#
########################################################
# examples/options to set specific C-compiler or Flags
########################################################
# cmake ../src/ -DCMAKE_C_COMPILER=$(which gcc)
# cmake ../src/ -DCMAKE_C_FLAGS="-O0 -p -g"
# cmake ../src/ -DCMAKE_C_COMPILER=$(which clang-3.5) -DCMAKE_C_FLAGS="-Oz -pedantic"
#
########################################################
# example SANITIZE options
########################################################
#
# SANITIZE with clang++
# cmake ../src/ -DCMAKE_C_COMPILER=/usr/bin/clang-3.5 -DCMAKE_C_FLAGS="-O0 -g -fsanitize=address -fno-omit-frame-pointer"
# make
# ASAN_OPTIONS=detect_leaks=1 ./checkit_tiff ...
#
# SANITIZE with gcc
# 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"
# AFL_HARDEN=1 make
# ASAN_OPTIONS=detect_leaks=1 ./checkit_tiff ...
#
#
########################################################
# example STATIC options
########################################################
#
# cmake ../src/ -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc" -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" -DPCRE_LIBRARY=/usr/lib/x86_64-linux-gnu/libpcre.a
#
########################################################
# example CLANG-TIDY
########################################################
# cmake ../src/ -DCMAKE_C_CLANG_TIDY:STRING="clang-tidy;-checks=-*,readability-*" -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCMAKE_C_COMPILER=/usr/bin/clang-3.8 -DCMAKE_C_FLAGS="-O0 -g -fsanitize=address -fno-omit-frame-pointer"
# make
# run-clang-tidy-3.8.py -clang-tidy-binary /usr/bin/clang-tidy-3.8
#
#
########################################################
# Testing
########################################################
# you need perl with Test::More
# change to directory "t/"
# run "perl -I ./ *.t"
#