<commit_before>cmake_minimum_required(VERSION 2.8.5)

project(genkfs C)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Werror")                                          

if (NOT DEFINED CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE RELEASE)
endif()

if(EMSCRIPTEN)
  set(CMAKE_EXE_LINKER_FLAGS "--pre-js ${CMAKE_CURRENT_SOURCE_DIR}/module.js -s EXPORTED_FUNCTIONS=\"['_main', '_emscripten_main']\"")
  set(CMAKE_C_FLAGS "-O3")
endif()

add_executable(genkfs main.c)

install(TARGETS genkfs DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)

ADD_CUSTOM_TARGET(man ALL)
ADD_CUSTOM_COMMAND(
  TARGET man
  COMMAND a2x --no-xmllint --doctype manpage --format manpage ${CMAKE_CURRENT_SOURCE_DIR}/genkfs.1.txt -D ${CMAKE_CURRENT_BINARY_DIR}
  OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1
)

if (NOT DEFINED CMAKE_INSTALL_MANDIR)
    set(CMAKE_INSTALL_MANDIR ${CMAKE_INSTALL_PREFIX}/share/man)
endif()
INSTALL(
    FILES ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1
    DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
)<commit_msg>Use BSD_SOURCE for now... (and remove Werror)<commit_after>cmake_minimum_required(VERSION 2.8.5)

project(genkfs C)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99 -D_POSIX_C_SOURCE=200809 -D_BSD_SOURCE -D_DEFAULT_SOURCE")

if (NOT DEFINED CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE RELEASE)
endif()

if(EMSCRIPTEN)
  set(CMAKE_EXE_LINKER_FLAGS "--pre-js ${CMAKE_CURRENT_SOURCE_DIR}/module.js -s EXPORTED_FUNCTIONS=\"['_main', '_emscripten_main']\"")
  set(CMAKE_C_FLAGS "-O3")
endif()

add_executable(genkfs main.c)

install(TARGETS genkfs DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)

ADD_CUSTOM_TARGET(man ALL)
ADD_CUSTOM_COMMAND(
  TARGET man
  COMMAND a2x --no-xmllint --doctype manpage --format manpage ${CMAKE_CURRENT_SOURCE_DIR}/genkfs.1.txt -D ${CMAKE_CURRENT_BINARY_DIR}
  OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1
)

if (NOT DEFINED CMAKE_INSTALL_MANDIR)
    set(CMAKE_INSTALL_MANDIR ${CMAKE_INSTALL_PREFIX}/share/man)
endif()
INSTALL(
    FILES ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1
    DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
)
{'fraction_non_alphanumeric': 0.11764705882352941, 'fraction_numerical': 0.01253616200578592, 'mean_word_length': 5.444099378881988, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '600560', 'n_tokens_mistral': 889, 'n_tokens_neox': 830, 'n_words': 133}