<commit_before>cmake_minimum_required(VERSION 3.6)

project(bun)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_VERBOSE_MAKEFILE ON)
SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-E")
SET(CMAKE_C_FLAGS_DISTRIBUTION "-E")
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -E")
set(SOURCE_FILES
        src/sqlite/sqlite3.c
        src/BoostHeaders.cpp
#        src/Bun.cpp
#        src/Generate.cpp
#        src/QueryExample.cpp
        include/blib/bun/bun.hpp
        include/blib/bun/CppTypeToSQLString.hpp
        include/blib/bun/DbLogger.hpp
        include/blib/bun/SimpleOID.hpp
        include/blib/utils/MD5.hpp
        include/blib/utils/Singleton.hpp
        include/blib/utils/TypeUtils.hpp
        include/blib/bun/PRef.hpp
        include/blib/bun/PRefHelper.hpp
        include/blib/bun/DbBackend.hpp
        include/blib/bun/SqliteBackend.hpp)

include_directories(include)
include_directories($ENV{BOOST_HEADER})
include_directories($ENV{BLIB_HEADER})
include_directories($ENV{THIRD_PARTY_HEADER})
include_directories($ENV{INCLUDE_DIR})
include_directories($ENV{SOCI_INCLUDE})

link_directories($ENV{LIB_DIR})

message("Print Dir: " $ENV{LIB_DIR})
add_library(libsoci_sqlite3 STATIC IMPORTED)
add_library(libsoci_core STATIC IMPORTED include/blib/bun/QueryHelper.hpp)

#set(LIBS ${LIBS} $ENV{LIB_DIR})
find_library (SOCI_LIB NAME libsoci_sqlite3 HINTS $ENV{LIB_DIR})
message("Lib = $ENV{LD_LIBRARY_PATH}")
#add_executable(bun ${SOURCE_FILES})
#target_link_libraries(bun $ENV{LIB_DIR}/libsoci_sqlite3.a $ENV{LIB_DIR}/libsoci_core.a)<commit_msg>Fix CMakeLists.txt for proper dependencies<commit_after>cmake_minimum_required(VERSION 3.6)

project(bun)

set(BLIB_HEADER include/blib)
set(THIRD_PARTY_HEADER
    include/
    include/third_party
    include/third_party/hdr
    include/third_party/json
    include/third_party/msgpack
    include/third_party/rapidjson
    include/third_party/spdlog
    include/third_party/sqlite
    include/third_party/unqlite
)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(SOURCE_FILES
        src/sqlite/sqlite3.c
#        src/BoostHeaders.cpp
        src/Bun.cpp
#        src/Generate.cpp
#        src/QueryExample.cpp
        include/blib/bun/bun.hpp
        include/blib/utils/MD5.hpp
        include/blib/utils/Singleton.hpp
)


include(FindBoost)
find_package( Boost 1.65 COMPONENTS system filesystem program_options REQUIRED )

include(FindSoci)
find_package( Soci 3.2 COMPONENTS sqlite3 REQUIRED )

include_directories( ${Boost_INCLUDE_DIR} ${SOCI_INCLUDE_DIR} )
if(${SOCI_FOUND})
  link_directories(${SOCI_LIBRARY} ${SOCI_sqlite3_PLUGIN})
else()
  message(WARNING "SOCI not found")
endif()

add_definitions(-DBUN_SQLITE -DFMT_HEADER_ONLY)

include_directories(include)
include_directories(${BLIB_HEADER})
include_directories(${THIRD_PARTY_HEADER})
include_directories(${INCLUDE_DIR})
include_directories(${SOCI_INCLUDE})

add_library(libsoci_sqlite3 STATIC IMPORTED)
add_library(libsoci_core STATIC IMPORTED include/blib/bun/QueryHelper.hpp)

find_library (SOCI_LIB NAME libsoci_sqlite3 HINTS ${SOCI_LIBRARY})
add_executable(bun ${SOURCE_FILES})
target_link_libraries(bun libsoci_sqlite3.a libsoci_core.a dl pthread)
{'fraction_non_alphanumeric': 0.10408098702942106, 'fraction_numerical': 0.007908889591901298, 'mean_word_length': 5.022857142857143, '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': '4959433', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1174, 'n_words': 150}