<commit_before>cmake_minimum_required (VERSION 2.6)
project (Daisy_C)

include(ExternalProject)

ExternalProject_Add(project_libdaisy
   DOWNLOAD_COMMAND ""
   UPDATE_COMMAND ""
   SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libdaisy
   BUILD_IN_SOURCE 1
   CONFIGURE_COMMAND ""
   BUILD_COMMAND $(MAKE) library outdir=${CMAKE_BINARY_DIR}/libdaisy/
   INSTALL_COMMAND ""
   )

add_library(libdaisy STATIC IMPORTED)
set_property(TARGET libdaisy PROPERTY IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/libdaisy/lib/libdaisy.a)
add_dependencies(libdaisy project_libdaisy)

# add_executable(daisy_c main.cpp)
add_library(daisyC SHARED daisy_C.cc)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libdaisy/include)
TARGET_LINK_LIBRARIES(daisyC libdaisy)<commit_msg>added git submodule init in cmakelists<commit_after>cmake_minimum_required (VERSION 2.6)
project (Daisy_C)

include(ExternalProject)

ExternalProject_Add(project_libdaisy
   DOWNLOAD_COMMAND git submodule init COMMAND git submodule update
   UPDATE_COMMAND ""
   SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libdaisy
   BUILD_IN_SOURCE 1
   CONFIGURE_COMMAND ""
   BUILD_COMMAND $(MAKE) library outdir=${CMAKE_BINARY_DIR}/libdaisy/
   INSTALL_COMMAND ""
   )

add_library(libdaisy STATIC IMPORTED)
set_property(TARGET libdaisy PROPERTY IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/libdaisy/lib/libdaisy.a)
add_dependencies(libdaisy project_libdaisy)

# add_executable(daisy_c main.cpp)
add_library(daisyC SHARED daisy_C.cc)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libdaisy/include)
TARGET_LINK_LIBRARIES(daisyC libdaisy)
{'fraction_non_alphanumeric': 0.07810499359795134, 'fraction_numerical': 0.0038412291933418692, 'mean_word_length': 7.780898876404494, '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': '6046037', 'n_tokens_mistral': 626, 'n_tokens_neox': 560, 'n_words': 85}