<commit_before>#
# Diluculum build system
# <NAME>
#

# General settings
project(Diluculum)
cmake_minimum_required(VERSION 2.6)


# Add CTest support
enable_testing()


# Packages
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost 1.39 COMPONENTS unit_test_framework REQUIRED)
find_package(Lua51 REQUIRED)
add_definitions(-DBOOST_ALL_DYN_LINK)


# Include directories
include_directories(${Boost_INCLUDE_DIRS}
                    ${LUA_INCLUDE_DIR}
                    ${CMAKE_SOURCE_DIR}/include)

# Link directories
link_directories(${Boost_LIBRARY_DIRS})


# Build the library
set(DiluculumSources
    Sources/InternalUtils.cpp
    Sources/LuaExceptions.cpp
    Sources/LuaFunction.cpp
    Sources/LuaState.cpp
    Sources/LuaUserData.cpp
    Sources/LuaUtils.cpp
    Sources/LuaValue.cpp
    Sources/LuaVariable.cpp
    Sources/LuaWrappers.cpp)

add_library(Diluculum STATIC ${DiluculumSources})

target_link_libraries(Diluculum ${LUA_LIBRARIES})

if(${CMAKE_SYSTEM_NAME} MATCHES Linux)
    target_link_libraries(Diluculum dl)
endif(${CMAKE_SYSTEM_NAME} MATCHES Linux)

# Now, the unit tests
function(AddUnitTest name)
    add_executable(${name} Tests/${name}.cpp)
    target_link_libraries(${name}
                          ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
                          ${LUA_LIBRARIES}
                          Diluculum)<commit_msg>Enabled G++ warnings.<commit_after>#
# Diluculum build system
# <NAME>
#

# General settings
project(Diluculum)
cmake_minimum_required(VERSION 2.6)


# Add CTest support
enable_testing()


# Packages
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost 1.39 COMPONENTS unit_test_framework REQUIRED)
find_package(Lua51 REQUIRED)
add_definitions(-DBOOST_ALL_DYN_LINK)


# Include directories
include_directories(${Boost_INCLUDE_DIRS}
                    ${LUA_INCLUDE_DIR}
                    ${CMAKE_SOURCE_DIR}/include)

# Link directories
link_directories(${Boost_LIBRARY_DIRS})


# Enable warnings when compiling with G++
if(CMAKE_COMPILER_IS_GNUCXX)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
endif(CMAKE_COMPILER_IS_GNUCXX)

# Build the library
set(DiluculumSources
    Sources/InternalUtils.cpp
    Sources/LuaExceptions.cpp
    Sources/LuaFunction.cpp
    Sources/LuaState.cpp
    Sources/LuaUserData.cpp
    Sources/LuaUtils.cpp
    Sources/LuaValue.cpp
    Sources/LuaVariable.cpp
    Sources/LuaWrappers.cpp)

add_library(Diluculum STATIC ${DiluculumSources})

target_link_libraries(Diluculum ${LUA_LIBRARIES})

if(${CMAKE_SYSTEM_NAME} MATCHES Linux)
    target_link_libraries(Diluculum dl)
endif(${CMAKE_SYSTEM_NAME} MATCHES Linux)

# Now, the unit tests
function(AddUnitTest name)
    add_executable(${name} Tests/${name}.cpp)
    target_link_libraries(${name}
                          ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
                          ${LUA_LIBRARIES}
                          Diluculum)
{'fraction_non_alphanumeric': 0.08697158697158697, 'fraction_numerical': 0.004851004851004851, 'mean_word_length': 3.876689189189189, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2074747', 'n_tokens_mistral': 1085, 'n_tokens_neox': 988, 'n_words': 155}