<commit_before><commit_msg>[sift] added cmake configuration file<commit_after>cmake_minimum_required(VERSION 2.8)
project(sift)

# The build type "Release" adds some optimizations
if (NOT CMAKE_BUILD_TYPE)
  set (CMAKE_BUILD_TYPE "Release")
endif ()

# Are we using gcc?
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
  # GCC on MacOs needs this option to use the clang assembler
  if (APPLE)
    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wa,-q")
    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-q")
  endif ()
  # Optimize to the current CPU and enable warnings
  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -Wall -Wextra")
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra")
endif ()

# Enable C99
if (CMAKE_VERSION VERSION_LESS "3.1")
  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
else ()
  set (CMAKE_C_STANDARD 99)
endif ()

# Enable OpenMP
find_package (OpenMP)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")

# Link LibTIFF, LibJPEG, LibPNG
find_package (TIFF REQUIRED)
find_package (JPEG REQUIRED)
find_package (PNG REQUIRED)
include_directories (PUBLIC ${TIFF_INCLUDE_DIR} PUBLIC ${JPEG_INCLUDE_DIR} PUBLIC ${PNG_INCLUDE_DIRS})
link_libraries (${TIFF_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES})

set(SOURCE_FILES_SIFT_ROI
    fancy_image.c
    fancy_image.h
    iio.h
    iio.c
    sift_anatomy_20141201/lib_description.c
    sift_anatomy_20141201/lib_description.h
    sift_anatomy_20141201/lib_discrete.c
    sift_anatomy_20141201/lib_discrete.h
    sift_anatomy_20141201/lib_keypoint.c
    sift_anatomy_20141201/lib_keypoint.h
    sift_anatomy_20141201/lib_scalespace.c
    sift_anatomy_20141201/lib_scalespace.h
    sift_anatomy_20141201/lib_sift.c
    sift_anatomy_20141201/lib_sift.h
    sift_anatomy_20141201/lib_sift_anatomy.c
    sift_anatomy_20141201/lib_sift_anatomy.h
    sift_anatomy_20141201/lib_util.c
    sift_anatomy_20141201/lib_util.h
    main.c)

set(SOURCE_FILES_MATCH_CLI
    sift_anatomy_20141201/lib_util.c
    sift_anatomy_20141201/lib_util.h
    sift_anatomy_20141201/lib_keypoint.c
    sift_anatomy_20141201/lib_keypoint.h
    sift_anatomy_20141201/lib_matching.c
    sift_anatomy_20141201/lib_matching.h
    sift_anatomy_20141201/match_cli.c)

set_property(SOURCE iio.c PROPERTY COMPILE_FLAGS "-Wno-unused-variable -Wno-unused-parameter -Wno-pointer-sign -Wno-parentheses -Wno-deprecated-declarations -Wno-unused-function")

add_executable(sift_roi ${SOURCE_FILES_SIFT_ROI})
add_executable(match_cli ${SOURCE_FILES_MATCH_CLI})
{'fraction_non_alphanumeric': 0.09285992976980101, 'fraction_numerical': 0.06944986344127975, 'mean_word_length': 5.50761421319797, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4699698', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1045, 'n_words': 165}