forked from acl-dev/acl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e1bd3c
commit 09e4b0d
Showing
46 changed files
with
695 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
project(acl) | ||
message(${CMAKE_SYSTEM_NAME}) | ||
|
||
#set(CMAKE_BUILD_TYPE Release) | ||
set(CMAKE_BUILD_TYPE Release CACHE STRING "set build type to release") | ||
add_subdirectory(lib_protocol/src lib_protocol) | ||
add_subdirectory(lib_acl/src lib_acl) | ||
add_subdirectory(lib_acl_cpp/src lib_acl_cpp) | ||
if (CMAKE_SYSTEM_NAME MATCHES "Linuxxx") | ||
add_subdirectory(lib_fiber/src lib_fiber) | ||
#set(CMAKE_BUILD_TYPE Release CACHE STRING "set build type to release") | ||
|
||
if (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR}) | ||
message(FATAL_ERROR "Please into another dir to build!") | ||
endif() | ||
|
||
add_subdirectory(lib_acl lib_acl) | ||
add_subdirectory(lib_protocol lib_protocol) | ||
add_subdirectory(lib_acl_cpp lib_acl_cpp) | ||
|
||
#if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android") | ||
if (CMAKE_SYSTEM_NAME MATCHES "Linux") | ||
add_subdirectory(lib_fiber/c lib_fiber) | ||
add_subdirectory(lib_fiber/cpp lib_fiber_cpp) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
keepme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
#set(CMAKE_BUILD_TYPE Release) | ||
#set(CMAKE_BUILD_TYPE Release CACHE STRING "set build type to release") | ||
|
||
#message(project_dir=${PROJECT_SOURCE_DIR}) | ||
|
||
if (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) | ||
message(FATAL_ERROR "Please into another dir to build!") | ||
endif() | ||
|
||
add_definitions( | ||
"-W" | ||
"-Wall" | ||
"-Werror" | ||
"-Wshadow" | ||
"-Wpointer-arith" | ||
"-Waggregate-return" | ||
"-Wmissing-prototypes" | ||
"-D_REENTRANT" | ||
"-D_USE_FAST_MACRO" | ||
"-DACL_WRITEABLE_CHECK" | ||
"-Wno-long-long" | ||
"-Wuninitialized" | ||
"-D_POSIX_PTHREAD_SEMANTICS" | ||
"-DACL_PREPARE_COMPILE" | ||
"-Wno-invalid-source-encoding" | ||
"-fPIC" | ||
"-Wstrict-prototypes" | ||
) | ||
|
||
if (CMAKE_BUILD_TYPE STREQUAL "") | ||
set(CMAKE_BUILD_TYPE "DEBUG") | ||
else() | ||
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE) | ||
endif() | ||
|
||
if (CMAKE_BUILD_TYPE STREQUAL "RELEASE") | ||
add_definitions("-O3") | ||
else() | ||
add_definitions("-g") | ||
endif() | ||
|
||
string(TOUPPER ${CMAKE_SYSTEM_NAME} CMAKE_SYSTEM_NAME) | ||
if(CMAKE_SYSTEM_NAME MATCHES "ANDROID") | ||
add_definitions("-DANDROID") | ||
elseif(CMAKE_SYSTEM_NAME MATCHES "LINUX") | ||
else() | ||
message(FATAL_ERROR "unknown CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}") | ||
endif() | ||
|
||
############################################################################## | ||
|
||
set(src ${CMAKE_CURRENT_SOURCE_DIR}/src) | ||
|
||
include_directories( | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_CURRENT_SOURCE_DIR}/include | ||
) | ||
|
||
set(sources | ||
${src}/stdlib | ||
${src}/stdlib/debug | ||
${src}/stdlib/memory | ||
${src}/stdlib/filedir | ||
${src}/stdlib/string | ||
${src}/stdlib/common | ||
${src}/stdlib/sys | ||
${src}/stdlib/sys/unix | ||
${src}/stdlib/configure | ||
${src}/stdlib/iostuff | ||
${src}/aio | ||
${src}/code | ||
${src}/db | ||
${src}/db/memdb | ||
${src}/db/mysql | ||
${src}/db/null | ||
${src}/db/zdb | ||
${src}/event | ||
${src}/init | ||
${src}/ioctl | ||
${src}/json | ||
${src}/master | ||
${src}/master/framework | ||
${src}/master/framework/trigger | ||
${src}/master/template | ||
${src}/msg | ||
${src}/net | ||
${src}/net/dns | ||
${src}/net/connect | ||
${src}/net/listen | ||
${src}/private | ||
${src}/thread | ||
${src}/unit_test | ||
${src}/xml | ||
) | ||
|
||
foreach(iter ${sources}) | ||
aux_source_directory(${iter} lib_src) | ||
endforeach() | ||
|
||
if(NOT CMAKE_SYSTEM_NAME MATCHES "ANDROID") | ||
set(lib_output_path ${PROJECT_BINARY_DIR}/lib) | ||
|
||
set(LIBRARY_OUTPUT_PATH ${lib_output_path}) | ||
add_library(_acl_static STATIC ${lib_src}) | ||
SET_TARGET_PROPERTIES(_acl_static PROPERTIES OUTPUT_NAME "_acl") | ||
|
||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${lib_output_path}) | ||
endif() | ||
|
||
add_library(_acl SHARED ${lib_src}) | ||
|
||
############################################################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.