<commit_before>################################################################################
#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
#  Read the zproject/README.md for information about making permanent changes. #
################################################################################

########################################################################
# Project setup
########################################################################
cmake_minimum_required(VERSION 2.8.12)
project(zproject)
enable_language(C)
enable_testing()

set(SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
# Select flags
SET(CMAKE_C_FLAGS_RELEASE "-O3")

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/builds/cmake/Modules)

# Will be used to add flags to pkg-config useful when apps want to statically link
set(pkg_config_libs_private "")
set(pkg_config_names_private "")

########################################################################
# options
########################################################################
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" ON)
IF (ENABLE_DRAFTS)
    ADD_DEFINITIONS (-DZPROJECT_BUILD_DRAFT_API)
ENDIF (ENABLE_DRAFTS)

########################################################################
# platform.h
########################################################################
include(CheckIncludeFile)
CHECK_INCLUDE_FILE("linux/wireless.h" HAVE_LINUX_WIRELESS_H)
CHECK_INCLUDE_FILE("net/if_media.h" HAVE_NET_IF_MEDIA_H)

include(CheckFunctionExists)
CHECK_FUNCTION_EXISTS("getifaddrs" HAVE_GETIFADDRS)
CHECK_FUNCTION_EXISTS("freeifaddrs" HAVE_FREEIFADDRS)

include(CheckIncludeFiles)
check_include_files("sys/socket.h;net/if.h" HAVE_NET_IF_H)
if (NOT HAVE_NET_IF_H)
    CHECK_INCLUDE_FILE("net/if.h" HAVE_NET_IF_H)
endif()

file(REMOVE "${SOURCE_DIR}/src/platform.h")

file(WRITE "${PROJECT_BINARY_DIR}/platform.h.in" "
#cmakedefine HAVE_LINUX_WIRELESS_H
#cmakedefine HAVE_NET_IF_H
#cmakedefine HAVE_NET_IF_MEDIA_H
#cmakedefine HAVE_GETIFADDRS
#cmakedefine HAVE_FREEIFADDRS
")

configure_file("${PROJECT_BINARY_DIR}/platform.h.in" "${PROJECT_BINARY_DIR}/platform.h")

#The MSVC C compiler is too out of date,
#so the sources have to be compiled as c++
if (MSVC)
    enable_language(CXX)
    file(GLOB sources "${SOURCE_DIR}/src/*.c")
    set_source_files_properties(
        ${sources}
        PROPERTIES LANGUAGE CXX
    )
    set(MORE_LIBRARIES ws2_32 Rpcrt4 Iphlpapi)
endif()

# specific case of windows UWP
if( "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" AND "${CMAKE_SYSTEM_VERSION}" STREQUAL "10.0")
  ADD_DEFINITIONS(-DZMQ_HAVE_WINDOWS_UWP)
  ADD_DEFINITIONS(-D_WIN32_WINNT=_WIN32_WINNT_WIN10)
endif()


# required libraries for mingw
if (MINGW)
    set(MORE_LIBRARIES -lws2_32 -lrpcrt4 -liphlpapi)
endif()

# required libraries for cygwin
if (CYGWIN)
    set(MORE_LIBRARIES)
endif()

list(APPEND CMAKE_MODULE_PATH "${SOURCE_DIR}")
set(OPTIONAL_LIBRARIES)
set(OPTIONAL_LIBRARIES_STATIC)

########################################################################
# GSL dependency
########################################################################
find_package(gsl REQUIRED)
IF (GSL_FOUND)
ELSE (GSL_FOUND)
    message( FATAL_ERROR "gsl not found." )
ENDIF (GSL_FOUND)

########################################################################
# version
########################################################################
set(ZPROJECT_VERSION_MAJOR 1)
set(ZPROJECT_VERSION_MINOR 1)
set(ZPROJECT_VERSION_PATCH 0)
set(ZPROJECT_VERSION "${ZPROJECT_VERSION_MAJOR}.${ZPROJECT_VERSION_MINOR}.${ZPROJECT_VERSION_PATCH}")
message(STATUS "Detected ZPROJECT Version - ${ZPROJECT_VERSION}")


########################################################################
# includes
########################################################################
set (zproject_headers
)

source_group ("Header Files" FILES ${zproject_headers})
install(FILES ${zproject_headers} DESTINATION include)

########################################################################
# executables
########################################################################

########################################################################
# tests
########################################################################
set(CLASSTEST_TIMEOUT 60 CACHE STRING "Timeout of the selftest of a class")
set(TOTAL_TIMEOUT 600 CACHE STRING "Timout of the total testsuite")

if(UNIX)
    find_program(MEMORYCHECK_COMMAND valgrind)
    set(MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --show-reachable=yes
                                     --error-exitcode=1
                                     --suppressions=src/.valgrind.supp")
endif()

set(TEST_CLASSES
)


if (NOT TARGET copy-selftest-ro)
    add_custom_target(
        copy-selftest-ro ALL
        COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/src/selftest-ro ${PROJECT_BINARY_DIR}/src/selftest-ro
    )
endif()

if (NOT TARGET make-selftest-rw)
    add_custom_target(
        make-selftest-rw ALL
        COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/src/selftest-rw
    )
endif()

set_directory_properties(
    PROPERTIES
    ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_BINARY_DIR}/src/selftest-ro;${PROJECT_BINARY_DIR}/src/selftest-rw"
)

foreach(TEST_CLASS ${TEST_CLASSES})
    add_test(
        NAME ${TEST_CLASS}
        COMMAND zproject_selftest --continue --verbose --test ${TEST_CLASS}
    )
    set_tests_properties(<commit_msg>Problem: zproject out of date with zproject<commit_after>################################################################################
#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
#  Read the zproject/README.md for information about making permanent changes. #
################################################################################

########################################################################
# Project setup
########################################################################
cmake_minimum_required(VERSION 2.8.12)
project(zproject)
enable_language(C)
enable_testing()

set(SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
# Select flags
SET(CMAKE_C_FLAGS_RELEASE "-O3")

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/builds/cmake/Modules)

# Will be used to add flags to pkg-config useful when apps want to statically link
set(pkg_config_libs_private "")
set(pkg_config_names_private "")

########################################################################
# options
########################################################################
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" ON)
IF (ENABLE_DRAFTS)
    ADD_DEFINITIONS (-DZPROJECT_BUILD_DRAFT_API)
ENDIF (ENABLE_DRAFTS)

########################################################################
# platform.h
########################################################################
include(CheckIncludeFile)
CHECK_INCLUDE_FILE("linux/wireless.h" HAVE_LINUX_WIRELESS_H)
CHECK_INCLUDE_FILE("net/if_media.h" HAVE_NET_IF_MEDIA_H)

include(CheckFunctionExists)
CHECK_FUNCTION_EXISTS("getifaddrs" HAVE_GETIFADDRS)
CHECK_FUNCTION_EXISTS("freeifaddrs" HAVE_FREEIFADDRS)

include(CheckIncludeFiles)
check_include_files("sys/socket.h;net/if.h" HAVE_NET_IF_H)
if (NOT HAVE_NET_IF_H)
    CHECK_INCLUDE_FILE("net/if.h" HAVE_NET_IF_H)
endif()

file(REMOVE "${SOURCE_DIR}/src/platform.h")

file(WRITE "${PROJECT_BINARY_DIR}/platform.h.in" "
#cmakedefine HAVE_LINUX_WIRELESS_H
#cmakedefine HAVE_NET_IF_H
#cmakedefine HAVE_NET_IF_MEDIA_H
#cmakedefine HAVE_GETIFADDRS
#cmakedefine HAVE_FREEIFADDRS
")

configure_file("${PROJECT_BINARY_DIR}/platform.h.in" "${PROJECT_BINARY_DIR}/platform.h")

#The MSVC C compiler is too out of date,
#so the sources have to be compiled as c++
if (MSVC)
    enable_language(CXX)
    file(GLOB sources "${SOURCE_DIR}/src/*.c")
    set_source_files_properties(
        ${sources}
        PROPERTIES LANGUAGE CXX
    )
    set(MORE_LIBRARIES ws2_32 Rpcrt4 Iphlpapi)
endif()

# specific case of windows UWP
if( "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" AND "${CMAKE_SYSTEM_VERSION}" STREQUAL "10.0")
  ADD_DEFINITIONS(-DZMQ_HAVE_WINDOWS_UWP)
  ADD_DEFINITIONS(-D_WIN32_WINNT=_WIN32_WINNT_WIN10)
endif()


# required libraries for mingw
if (MINGW)
    set(MORE_LIBRARIES -lws2_32 -lrpcrt4 -liphlpapi)
endif()

# required libraries for cygwin
if (CYGWIN)
    set(MORE_LIBRARIES)
endif()

list(APPEND CMAKE_MODULE_PATH "${SOURCE_DIR}")
set(OPTIONAL_LIBRARIES)
set(OPTIONAL_LIBRARIES_STATIC)

########################################################################
# GSL dependency
########################################################################
find_package(gsl REQUIRED)
IF (GSL_FOUND)
ELSE (GSL_FOUND)
    message( FATAL_ERROR "gsl not found." )
ENDIF (GSL_FOUND)

########################################################################
# version
########################################################################
set(ZPROJECT_VERSION_MAJOR 1)
set(ZPROJECT_VERSION_MINOR 1)
set(ZPROJECT_VERSION_PATCH 0)
set(ZPROJECT_VERSION "${ZPROJECT_VERSION_MAJOR}.${ZPROJECT_VERSION_MINOR}.${ZPROJECT_VERSION_PATCH}")
message(STATUS "Detected ZPROJECT Version - ${ZPROJECT_VERSION}")


########################################################################
# includes
########################################################################
set (zproject_headers
)

source_group ("Header Files" FILES ${zproject_headers})
install(FILES ${zproject_headers} DESTINATION include)

########################################################################
# executables
########################################################################

########################################################################
# tests
########################################################################
set(CLASSTEST_TIMEOUT 60 CACHE STRING "Timeout of the selftest of a class")
set(TOTAL_TIMEOUT 600 CACHE STRING "Timout of the total testsuite")

if(UNIX)
    find_program(MEMORYCHECK_COMMAND valgrind)
    set(MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --show-reachable=yes
                                     --error-exitcode=1
                                     --suppressions=src/.valgrind.supp")
endif()

set(TEST_CLASSES
)


if (NOT TARGET copy-selftest-ro)
    add_custom_target(
        copy-selftest-ro ALL
        COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/src/selftest-ro ${PROJECT_BINARY_DIR}/src/selftest-ro
    )
endif()

if (NOT TARGET make-selftest-rw)
    add_custom_target(
        make-selftest-rw ALL
        COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/src/selftest-rw
    )
endif()

set_directory_properties(
    PROPERTIES
    ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_BINARY_DIR}/src/selftest-ro;${PROJECT_BINARY_DIR}/src/selftest-rw"
)

foreach(TEST_CLASS ${TEST_CLASSES})
    add_test(
        NAME ${TEST_CLASS}
        COMMAND zproject_selftest --continue --verbose --test ${TEST_CLASS}
    )
    IF (WIN32 AND CMAKE_PREFIX_PATH)
		file(TO_NATIVE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH_WIN)
		set_tests_properties(
			${TEST_CLASS}
			PROPERTIES ENVIRONMENT "PATH=%PATH%\;${CMAKE_PREFIX_PATH_WIN}\\bin"
		)
    ENDIF (WIN32 AND CMAKE_PREFIX_PATH)
    set_tests_properties(
{'fraction_non_alphanumeric': 0.30627563934712404, 'fraction_numerical': 0.00645893340315964, 'mean_word_length': 6.951422623178348, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '53948', 'n_tokens_mistral': 3616, 'n_tokens_neox': 3398, 'n_words': 621}