<commit_before>cmake_minimum_required (VERSION 2.6)

project (roxml C)

set (VERSION "2")
set (SOVERSION "2.3.0")

option(CONFIG_XML_FILE   "Can the target library parse file documents. When set to OFF, this result in smaller binary." ON)
option(CONFIG_XML_EDIT   "Can the target library modify XML tree. When set to OFF, this result in smaller binary (this saves about 3kb)" ON)
option(CONFIG_XML_COMMIT "Can the target library commit a tree. When set to OFF, this result in smaller binary (this saves about 5kb)." ON)
option(CONFIG_XML_XPATH  "Can the target library perform xpath queries. When set to 0, this result in smaller binary (this saves about 20kb)." ON)

# Enable UnitTest and CDash support
# This also adds the option BUILD_TESTING
include(CTest)
if (BUILD_TESTING)
    add_subdirectory(unittest)
endif()

if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
    add_definitions(-DLINUX)
endif()

include_directories(src)

add_definitions (-DIGNORE_EMPTY_TEXT_NODES -DCONFIG_XML_CONTENT -DCONFIG_XML_NAV -DCONFIG_XML_BUFF)

set(ROXML_SOURCES
	src/roxml_core.c<commit_msg>Add more GCC warnings make it C99.<commit_after>cmake_minimum_required (VERSION 2.6)

project (roxml C)

set (VERSION "2")
set (SOVERSION "2.3.0")

option(CONFIG_XML_FILE   "Can the target library parse file documents. When set to OFF, this result in smaller binary." ON)
option(CONFIG_XML_EDIT   "Can the target library modify XML tree. When set to OFF, this result in smaller binary (this saves about 3kb)" ON)
option(CONFIG_XML_COMMIT "Can the target library commit a tree. When set to OFF, this result in smaller binary (this saves about 5kb)." ON)
option(CONFIG_XML_XPATH  "Can the target library perform xpath queries. When set to 0, this result in smaller binary (this saves about 20kb)." ON)

# Enable UnitTest and CDash support
# This also adds the option BUILD_TESTING
include(CTest)
if (BUILD_TESTING)
    add_subdirectory(unittest)
endif()

if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
    add_definitions(-DLINUX)
endif()

# Configure GCC to compile C99 code
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
    set(WARNINGS "${WARNINGS} -Wall -Wextra -Wformat=2 -Wunknown-pragmas -Wstrict-aliasing -Wpointer-arith -Wcast-align -Wmissing-noreturn -Wundef -Wwrite-strings -Wshadow")

    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ${WARNINGS}")
endif()

include_directories(src)

add_definitions (-DIGNORE_EMPTY_TEXT_NODES -DCONFIG_XML_CONTENT -DCONFIG_XML_NAV -DCONFIG_XML_BUFF)

set(ROXML_SOURCES
	src/roxml_core.c
{'fraction_non_alphanumeric': 0.08548707753479125, 'fraction_numerical': 0.011530815109343936, 'mean_word_length': 5.337531486146096, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5235681', 'n_tokens_mistral': 871, 'n_tokens_neox': 836, 'n_words': 285}