<commit_before>cmake_minimum_required (VERSION 2.6)


project ("varnish-influxdb")

set (VERSION_MAJOR 0)
set (VERSION_MINOR 1)

# set (CMAKE_BUILD_TYPE Release)
add_definitions(-Wall -Werror -pthread)

set (CMAKE_VERBOSE_MAKEFILE true)

# Keep RPATH to /usr/lib/varnish(-plus)/ on installed binaries.
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

find_package(PkgConfig)
pkg_check_modules(VARNISH REQUIRED varnishapi)

if(${VARNISH_VERSION} VERSION_LESS 4.1 )
	message(FATAL_ERROR "Varnish 4.1 or newer is required")
endif()

# Look up keys in pkg-config that pkg_check_modules() doesn't populate.
find_program(PKGCONFIG_EXECUTABLE NAMES pkg-config )

#message(STATUS "is " ${VARNISH_VMODTOOL} " end")
message(STATUS "is " ${VARNISH_LIBDIR} " end")

add_definitions(${VARNISH_CFLAGS})

include_directories("${PROJECT_BINARY_DIR}")
include_directories("src")

add_executable(influxstat src/influxstat.c)

# we need VSB_* from libvarnish, but no pkg-config for it.
target_link_libraries(influxstat /usr/lib/varnish-plus/libvarnish.so)

target_link_libraries(influxstat m)
target_link_libraries(influxstat ${VARNISH_LIBRARIES})

install (PROGRAMS influxstat RENAME varnish-influxstat DESTINATION bin)<commit_msg>Find libvarnish.so on stock Varnish.<commit_after>cmake_minimum_required (VERSION 2.6)


project ("varnish-influxdb")

set (VERSION_MAJOR 0)
set (VERSION_MINOR 1)

# set (CMAKE_BUILD_TYPE Release)
add_definitions(-Wall -Werror -pthread)

set (CMAKE_VERBOSE_MAKEFILE true)

# Keep RPATH to /usr/lib/varnish(-plus)/ on installed binaries.
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

find_package(PkgConfig)
pkg_check_modules(VARNISH REQUIRED varnishapi)

if(${VARNISH_VERSION} VERSION_LESS 4.1 )
	message(FATAL_ERROR "Varnish 4.1 or newer is required")
endif()

# Look up keys in pkg-config that pkg_check_modules() doesn't populate.
find_program(PKGCONFIG_EXECUTABLE NAMES pkg-config )

#message(STATUS "is " ${VARNISH_VMODTOOL} " end")
message(STATUS "is " ${VARNISH_LIBDIR} " end")

add_definitions(${VARNISH_CFLAGS})

include_directories("${PROJECT_BINARY_DIR}")
include_directories("src")

add_executable(influxstat src/influxstat.c)

# we need VSB_* from libvarnish, but no pkg-config for it.
target_link_libraries(influxstat /usr/lib/varnish/libvarnish.so)

target_link_libraries(influxstat m)
target_link_libraries(influxstat ${VARNISH_LIBRARIES})

install (PROGRAMS influxstat RENAME varnish-influxstat DESTINATION bin)
{'fraction_non_alphanumeric': 0.10213289581624282, 'fraction_numerical': 0.006562756357670222, 'mean_word_length': 7.184563758389261, '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': '3044721', 'n_tokens_mistral': 962, 'n_tokens_neox': 901, 'n_words': 189}