<commit_before>cmake_minimum_required(VERSION 2.6)

PROJECT(picrin)

# load extra cmake modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")

# ----

# git submodule update --init
find_package(Git REQUIRED)
execute_process(
  COMMAND ${GIT_EXECUTABLE} submodule update --init
  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
  )

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
set(CMAKE_C_FLAGS "-Wall -Wextra")
set(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG=1")

option(USE_C11_FEATURE "Enable c11 feature" OFF)
if(USE_C11_FEATURE)
  add_definitions(-std=c11)
else()
  add_definitions(-std=c99)     # at least c99 is required
endif()

include_directories(include extlib)

# build picrin
include(piclib/CMakeLists.txt)
include(contrib/CMakeLists.txt)
include(src/CMakeLists.txt)
include(tools/CMakeLists.txt)

# ----

# $ make run
add_custom_target(run bin/picrin DEPENDS repl)

# $ make test
add_custom_target(test DEPENDS no-act test-r7rs)

# $ make no-act
add_custom_target(no-act bin/picrin -e '' > /dev/null DEPENDS repl)

# $ make test-r7rs
add_custom_target(test-r7rs bin/picrin ${PROJECT_SOURCE_DIR}/t/r7rs-tests.scm DEPENDS repl)

# $ make tak
add_custom_target(tak bin/picrin etc/tak.scm DEPENDS repl)

# $ make lines
add_custom_target(lines find . -name "*.[chyl]" | xargs wc -l WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})<commit_msg>make no-act: direct error logs to /dev/null<commit_after>cmake_minimum_required(VERSION 2.6)

PROJECT(picrin)

# load extra cmake modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")

# ----

# git submodule update --init
find_package(Git REQUIRED)
execute_process(
  COMMAND ${GIT_EXECUTABLE} submodule update --init
  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
  )

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
set(CMAKE_C_FLAGS "-Wall -Wextra")
set(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG=1")

option(USE_C11_FEATURE "Enable c11 feature" OFF)
if(USE_C11_FEATURE)
  add_definitions(-std=c11)
else()
  add_definitions(-std=c99)     # at least c99 is required
endif()

include_directories(include extlib)

# build picrin
include(piclib/CMakeLists.txt)
include(contrib/CMakeLists.txt)
include(src/CMakeLists.txt)
include(tools/CMakeLists.txt)

# ----

# $ make run
add_custom_target(run bin/picrin DEPENDS repl)

# $ make test
add_custom_target(test DEPENDS no-act test-r7rs)

# $ make no-act
add_custom_target(no-act bin/picrin -e '' > /dev/null 2> /dev/null DEPENDS repl)

# $ make test-r7rs
add_custom_target(test-r7rs bin/picrin ${PROJECT_SOURCE_DIR}/t/r7rs-tests.scm DEPENDS repl)

# $ make tak
add_custom_target(tak bin/picrin etc/tak.scm DEPENDS repl)

# $ make lines
add_custom_target(lines find . -name "*.[chyl]" | xargs wc -l WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
{'fraction_non_alphanumeric': 0.11837895485247067, 'fraction_numerical': 0.013864201919658727, 'mean_word_length': 5.574766355140187, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '1145992', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1100, 'n_words': 211}