<commit_before>cmake_minimum_required(VERSION 2.8.7)

set(CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")

project(common)

set(COMMON_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/includes)

set(SOURCE_FILES
  User.cpp
  Session.cpp
  Group.cpp
  Common.cpp

  includes/User.hpp
  includes/Session.hpp
  includes/Group.hpp
  includes/Common.hpp
  includes/UserFactory.hpp
  includes/Errors.hpp
  )

if(${NO_DATABASE})
  set(SOURCE_FILES
    ${SOURCE_FILES}
    test-includes/GroupFactory.hpp
    )
endif(${NO_DATABASE})

add_library(chapp_common ${SOURCE_FILES})

if(${NO_DATABASE})
  target_include_directories(chapp_common PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/test-includes
  )
  target_compile_definitions(chapp_common PRIVATE
    NO_DATABASE
  )
else()
  find_path(DATABASE_INCLUDES
    names Database.h GroupFactory.hpp
    paths ${CMAKE_SOURCE_DIR}/redis/includes)

  target_include_directories(chapp_common PUBLIC
    ${DATABASE_INCLUDES}
    )
endif(${NO_DATABASE})

target_include_directories(chapp_common PUBLIC
        ${COMMON_INCLUDES}<commit_msg>[common] Fix Database include<commit_after>cmake_minimum_required(VERSION 2.8.7)

set(CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")

project(common)

set(COMMON_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/includes)

set(SOURCE_FILES
  User.cpp
  Session.cpp
  Group.cpp
  Common.cpp

  includes/User.hpp
  includes/Session.hpp
  includes/Group.hpp
  includes/Common.hpp
  includes/UserFactory.hpp
  includes/Errors.hpp
  )

if(${NO_DATABASE})
  set(SOURCE_FILES
    ${SOURCE_FILES}
    test-includes/GroupFactory.hpp
    )
endif(${NO_DATABASE})

add_library(chapp_common ${SOURCE_FILES})

if(${NO_DATABASE})
  target_include_directories(chapp_common PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/test-includes
  )
  target_compile_definitions(chapp_common PRIVATE
    NO_DATABASE
  )
else()
  find_path(DATABASE_INCLUDES Database.hpp
    paths ${CMAKE_SOURCE_DIR}/redis/includes)

  target_include_directories(chapp_common PUBLIC
    ${DATABASE_INCLUDES}
    )
endif(${NO_DATABASE})

target_include_directories(chapp_common PUBLIC
        ${COMMON_INCLUDES}
{'fraction_non_alphanumeric': 0.10116550116550116, 'fraction_numerical': 0.006526806526806527, 'mean_word_length': 5.293255131964809, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '472859', 'n_tokens_mistral': 845, 'n_tokens_neox': 782, 'n_words': 98}