<commit_before>PROJECT(cppcmsskel)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

set(PROJECT_VERSION "0.1.0")
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
add_custom_target(dist
    COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
            | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
	        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
enable_testing()


include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}
    cppcms_skel
)


file(
    GLOB
    framework_generics_files
    cppcms_skel/generics/*
)

file(
    GLOB
    framework_models_files
    cppcms_skel/models/*
)



file(
    GLOB
    framework_controllers_files
    cppcms_skel/controllers/webs/*
    cppcms_skel/controllers/generics/*
)


# used to create libccpcmsskel.so
add_library(
    cppcmsskel
    SHARED
    ${framework_generics_files}
    ${framework_models_files}
    ${framework_controllers_files}
)


# TODO cppdb should not be mandatory 
set(
    CPPCMSSKEL_LIBS
    cppcms
    cppdb
    booster
)

target_link_libraries(
    cppcmsskel
    ${CPPCMSSKEL_LIBS}
)


    
# we install the "template" files (i.e c++ code with placeholders)
# a local copy of them will be made each time we create a new app
install(
    DIRECTORY template
    DESTINATION share/cppcmsskel
    PATTERN "README" EXCLUDE
)<commit_msg>improved a little the CMakeList to make it more portable<commit_after>PROJECT(cppcmsskel)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

set(PROJECT_VERSION "0.1.0")
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
add_custom_target(dist
    COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
            | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
	        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
enable_testing()

###################
# Dependency check
##################
find_library(CPPCMS cppcms)
find_library(BOOSTER booster)
find_library(CPPDB cppdb)



###################
# source files
###################
file(
    GLOB
    framework_generics_files
    cppcms_skel/generics/*
)

file(
    GLOB
    framework_models_files
    cppcms_skel/models/*
)



file(
    GLOB
    framework_controllers_files
    cppcms_skel/controllers/webs/*
    cppcms_skel/controllers/generics/*
)


# used to create libccpcmsskel.so

include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}
    cppcms_skel
)


add_library(
    cppcmsskel
    SHARED
    ${framework_generics_files}
    ${framework_models_files}
    ${framework_controllers_files}
)


# TODO cppdb should not be mandatory 
set(
    CPPCMSSKEL_LIBS
    ${CPPCMS}
    ${CPPDB}
    ${BOOSTER}
)

target_link_libraries(
    cppcmsskel
    ${CPPCMSSKEL_LIBS}
)


    
# we install the "template" files (i.e c++ code with placeholders)
# a local copy of them will be made each time we create a new app
install(
    DIRECTORY template
    DESTINATION share/cppcmsskel
    PATTERN "README" EXCLUDE
)
{'fraction_non_alphanumeric': 0.10814606741573034, 'fraction_numerical': 0.0049157303370786515, 'mean_word_length': 3.87008547008547, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3984255', 'n_tokens_mistral': 1087, 'n_tokens_neox': 996, 'n_words': 201}