<commit_before>cmake_minimum_required(VERSION 2.8)
project(ENJI)

if (!MSVC)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()

include_directories(src)
include_directories(deps/include)

find_library(LIBUV_LIBRARY_DEBUG libuv deps/lib/debug)
find_library(LIBUV_LIBRARY_RELEASE libuv deps/lib/release)

if (CMAKE_BUILD_TYPE MATCHES Debug)
    set(LIBUV_LIBRARY ${LIBUV_LIBRARY_DEBUG})
else()
    set(LIBUV_LIBRARY ${LIBUV_LIBRARY_RELEASE})
endif()

if (MSVC)
    set(ENJI_LIBS Ws2_32.lib Iphlpapi.lib psapi.lib userenv.lib ${LIBUV_LIBRARY})
else()
    set(ENJI_LIBS ${LIBUV_LIBRARY})
endif()

set(ENJI_HEADERS src/enji/common.h src/enji/http.h src/enji/server.h)
set(ENJI_SOURCES src/enji/common.cpp src/enji/http.cpp src/enji/server.cpp deps/src/http_parser.c)

add_library(
    enji
    STATIC
    ${ENJI_SOURCES} ${ENJI_HEADERS}
)

add_executable(enjitests tests/test.cpp deps/src/gtest/gtest-all.cc)
add_executable(hello_world examples/hello_world.cpp)
add_executable(ping_pong examples/ping_pong.cpp)

target_link_libraries(enjitests enji ${ENJI_LIBS})
target_link_libraries(hello_world enji ${ENJI_LIBS})
target_link_libraries(ping_pong enji ${ENJI_LIBS})<commit_msg>CMakeLists fixes for mac cmake<commit_after>cmake_minimum_required(VERSION 2.8)
project(ENJI)

if (NOT MSVC)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()

include_directories(src)
include_directories(deps/include)

find_library(LIBUV_LIBRARY_DEBUG libuv deps/lib/debug)
find_library(LIBUV_LIBRARY_RELEASE libuv deps/lib/release)

if (CMAKE_BUILD_TYPE MATCHES Debug)
    set(LIBUV_LIBRARY ${LIBUV_LIBRARY_DEBUG})
else()
    set(LIBUV_LIBRARY ${LIBUV_LIBRARY_RELEASE})
endif()

if (MSVC)
    set(ENJI_LIBS Ws2_32.lib Iphlpapi.lib psapi.lib userenv.lib ${LIBUV_LIBRARY})
else()
    set(ENJI_LIBS ${LIBUV_LIBRARY})
endif()

set(ENJI_HEADERS src/enji/common.h src/enji/http.h src/enji/server.h)
set(ENJI_SOURCES src/enji/common.cpp src/enji/http.cpp src/enji/server.cpp deps/src/http_parser.c)

add_library(
    enji
    STATIC
    ${ENJI_SOURCES} ${ENJI_HEADERS}
)

add_executable(enjitests tests/test.cpp deps/src/gtest/gtest-all.cc)
add_executable(hello_world examples/hello_world.cpp)
add_executable(ping_pong examples/ping_pong.cpp)

set(ENJI_LINKS enji ${ENJI_LIBS})

target_link_libraries(enjitests enji ${ENJI_LINKS})
target_link_libraries(hello_world ${ENJI_LINKS})
target_link_libraries(ping_pong ${ENJI_LINKS})
{'fraction_non_alphanumeric': 0.11551155115511551, 'fraction_numerical': 0.005775577557755775, 'mean_word_length': 6.722929936305732, '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': '1622589', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1016, 'n_words': 143}