Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posix net.hpp refactor for reference #96

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ build_release/
CMakeFiles
_deps
build/
dist/
cmake_install.cmake
CMakeCache.txt
Makefile
*.log
*.swp
_deps
CMakeFiles
CMakeCache.txt
Expand Down
21 changes: 4 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if(MSVC)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
Expand Down Expand Up @@ -107,7 +108,8 @@ include_directories(${cxxopts_SOURCE_DIR}/include)
# export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/
FetchContent_Declare(
picohttpparser
GIT_REPOSITORY https://github.com/unum-cloud/picohttpparser.git
#GIT_REPOSITORY https://github.com/unum-cloud/picohttpparser.git
GIT_REPOSITORY https://github.com/MarkReedZ/picohttpparser.git
GIT_SHALLOW 1
)
FetchContent_MakeAvailable(picohttpparser)
Expand All @@ -123,21 +125,6 @@ FetchContent_MakeAvailable(tb64)
include_directories(${tb64_SOURCE_DIR})
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

FetchContent_Declare(
mbedtls
GIT_REPOSITORY https://github.com/Mbed-TLS/mbedtls/
GIT_TAG v3.4.0
CMAKE_ARGS
-DENABLE_PROGRAMS=OFF
-DENABLE_TESTING=OFF
-DUSE_SHARED_MBEDTLS_LIBRARY=OFF
-DUSE_STATIC_MBEDTLS_LIBRARY=ON
)

FetchContent_MakeAvailable(mbedtls)
include_directories(${mbedtls_SOURCE_DIR}/include)
set(mbedtls_LIBS mbedtls mbedcrypto mbedx509)

# LibUring
if(LINUX)
set(URING_DIR ${CMAKE_BINARY_DIR}/_deps/liburing-ep)
Expand Down Expand Up @@ -168,7 +155,7 @@ find_package(Threads REQUIRED)
include_directories(include/ src/)

add_library(ucall_server_posix src/engine_posix.cpp)
target_link_libraries(ucall_server_posix simdjson::simdjson Threads::Threads ${mbedtls_LIBS})
target_link_libraries(ucall_server_posix simdjson::simdjson Threads::Threads )
set(PYTHON_BACKEND ucall_server_posix)

add_executable(ucall_example_login_posix examples/login/ucall_server.cpp)
Expand Down
Loading
Loading