<commit_before>cmake_minimum_required(VERSION 2.8)

project(LetMeCreate)


set(LETMECREATE_MAJOR_VERSION 1)
set(LETMECREATE_MINOR_VERSION 1)
set(LETMECREATE_PATCH_VERSION 0)
set(LETMECREATE_VERSION ${LETMECREATE_MAJOR_VERSION}.${LETMECREATE_MINOR_VERSION}.${LETMECREATE_PATCH_VERSION})
set(PROJECT_VERSION ${LETMECREATE_VERSION})

option(BUILD_EXAMPLES "Build examples" OFF)
option(BUILD_TESTS "Build tests" OFF)

file(GLOB core_srcs src/core/*.c)
file(GLOB click_srcs src/click/*.c)

file(GLOB core_hdrs include/letmecreate/core/*.h)
file(GLOB click_hdrs include/letmecreate/click/*.h)

include_directories(include)

# Create targets
add_library(letmecreate_core SHARED ${core_srcs} ${core_hdrs})
add_library(letmecreate_click SHARED ${click_srcs} ${click_hdrs})
target_link_libraries(letmecreate_click letmecreate_core)

# Enable warnings
set_target_properties(letmecreate_core PROPERTIES C_VISIBILITY_PRESET hidden)
set_target_properties(letmecreate_click PROPERTIES C_VISIBILITY_PRESET hidden)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -ggdb3")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wextra -O2")

# Export symbols
include(GenerateExportHeader)
generate_export_header(letmecreate_core EXPORT_FILE_NAME "include/letmecreate/core/export.h")
generate_export_header(letmecreate_click EXPORT_FILE_NAME "include/letmecreate/click/export.h")


target_include_directories(
    letmecreate_core PUBLIC
    "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
    "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
)
target_include_directories(
    letmecreate_click PUBLIC
    "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
    "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
)


set(config_install_dir "lib/cmake/${PROJECT_NAME}")
set(include_install_dir "include")

set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")

# Configuration
set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")<commit_msg>cmakelists: regroup export symbols commands<commit_after>cmake_minimum_required(VERSION 2.8)

project(LetMeCreate)


set(LETMECREATE_MAJOR_VERSION 1)
set(LETMECREATE_MINOR_VERSION 1)
set(LETMECREATE_PATCH_VERSION 0)
set(LETMECREATE_VERSION ${LETMECREATE_MAJOR_VERSION}.${LETMECREATE_MINOR_VERSION}.${LETMECREATE_PATCH_VERSION})
set(PROJECT_VERSION ${LETMECREATE_VERSION})

option(BUILD_EXAMPLES "Build examples" OFF)
option(BUILD_TESTS "Build tests" OFF)

file(GLOB core_srcs src/core/*.c)
file(GLOB click_srcs src/click/*.c)

file(GLOB core_hdrs include/letmecreate/core/*.h)
file(GLOB click_hdrs include/letmecreate/click/*.h)

include_directories(include)

# Create targets
add_library(letmecreate_core SHARED ${core_srcs} ${core_hdrs})
add_library(letmecreate_click SHARED ${click_srcs} ${click_hdrs})
target_link_libraries(letmecreate_click letmecreate_core)

# Export symbols
include(GenerateExportHeader)
generate_export_header(letmecreate_core EXPORT_FILE_NAME "include/letmecreate/core/export.h")
generate_export_header(letmecreate_click EXPORT_FILE_NAME "include/letmecreate/click/export.h")
set_target_properties(letmecreate_core PROPERTIES C_VISIBILITY_PRESET hidden)
set_target_properties(letmecreate_click PROPERTIES C_VISIBILITY_PRESET hidden)

# Enable warnings
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -ggdb3")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wextra -O2")


target_include_directories(
    letmecreate_core PUBLIC
    "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
    "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
)
target_include_directories(
    letmecreate_click PUBLIC
    "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
    "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
)


set(config_install_dir "lib/cmake/${PROJECT_NAME}")
set(include_install_dir "include")

set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")

# Configuration
set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
{'fraction_non_alphanumeric': 0.10681265206812653, 'fraction_numerical': 0.0034063260340632603, 'mean_word_length': 10.201634877384196, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1145958', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1451, 'n_words': 195}