feat/support_fiber #2

Merged
tqcq merged 57 commits from feat/support_fiber into master 2024-06-21 10:33:52 +08:00
3 changed files with 27 additions and 14 deletions
Showing only changes of commit f9c0e90b06 - Show all commits

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12) cmake_minimum_required(VERSION 3.5)
set(tile_VERSION_MAJOR 0) set(tile_VERSION_MAJOR 0)
set(tile_VERSION_MINOR 1) set(tile_VERSION_MINOR 1)
@ -21,6 +21,11 @@ option(TILE_WITH_OPENSSL "Build with openssl" OFF)
option(TILE_BUILD_SHARED "Build shared library" ON) option(TILE_BUILD_SHARED "Build shared library" ON)
option(TILE_BUILD_STATIC "Build static library" ON) option(TILE_BUILD_STATIC "Build static library" ON)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_PROJECT_DIR)
set(TILE_BUILD_TESTS ON)
set(TILE_BUILD_BENCHMARKS ON)
endif()
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug") set(CMAKE_BUILD_TYPE "Debug")
endif() endif()
@ -54,8 +59,6 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(WHOLE_ARCHIVE_SUFFIX "-Wl,--no-whole-archive") set(WHOLE_ARCHIVE_SUFFIX "-Wl,--no-whole-archive")
endif() endif()
find_package(Threads REQUIRED)
# extern int getifaddrs(struct ifaddrs **ifap); extern void freeifaddrs(struct # extern int getifaddrs(struct ifaddrs **ifap); extern void freeifaddrs(struct
# ifaddrs *ifa); # ifaddrs *ifa);
include(CheckSymbolExists) include(CheckSymbolExists)
@ -218,14 +221,9 @@ target_include_directories(
target_link_libraries( target_link_libraries(
tile tile
PUBLIC # -Wl,--start-group PUBLIC # -Wl,--start-group
nova_context nova_context zlib gflags::gflags glog::glog
zlib
gflags::gflags
glog::glog
# -Wl,--end-group # -Wl,--end-group
libcurl libcurl fmt)
fmt
Threads::Threads)
if((CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64") OR (CMAKE_SYSTEM_PROCESSOR MATCHES if((CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64") OR (CMAKE_SYSTEM_PROCESSOR MATCHES
"mips*")) "mips*"))
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

8
docker-compose.yml Normal file
View File

@ -0,0 +1,8 @@
services:
build-env:
image: ubuntu:16.04
restart: always
container_name: "env"
command: ["/bin/bash", "-c", "sleep 36000"]
volumes:
- ./:/workspace

View File

@ -1,8 +1,15 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.5)
project(zlib VERSION 1.3.1.1 LANGUAGES C) project(
zlib
VERSION 1.3.1.1
LANGUAGES C)
file(GLOB SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/zlib/*.c") file(GLOB SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/zlib/*.c")
add_library(zlib STATIC ${SRC_FILES}) add_library(zlib STATIC ${SRC_FILES})
target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/zlib)
add_library(ZLIB::ZLIB ALIAS zlib) add_library(ZLIB::ZLIB ALIAS zlib)
install(TARGETS zlib EXPORT zlib) install(
TARGETS zlib
EXPORT zlib
DESTINATION lib)