From e3f56d75aa0e75c294cffacb9f4444f4ac978258 Mon Sep 17 00:00:00 2001 From: an-tao <20741618@qq.com> Date: Fri, 27 Apr 2018 11:00:24 +0800 Subject: [PATCH] add trantor lib --- .gitignore | 2 ++ .gitmodules | 3 +++ CMakeLists.txt | 16 ++++++++++++++++ trantor | 1 + 4 files changed, 22 insertions(+) create mode 100644 .gitmodules create mode 100755 CMakeLists.txt create mode 160000 trantor diff --git a/.gitignore b/.gitignore index 259148fa..5baf201a 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ *.exe *.out *.app + +build diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..1f14c394 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "trantor"] + path = trantor + url = https://github.com/an-tao/trantor.git diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 00000000..d499b9c1 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required (VERSION 2.6) +EXEC_PROGRAM(gcc ARGS "--version | grep "^gcc"|awk '{print $3}' | sed s'/)//g'" OUTPUT_VARIABLE version) +MESSAGE(STATUS "This is gcc version:: " ${version}) + +project (DROGON) + +if (version LESS 6.0.0) + MESSAGE(STATUS "old gcc") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fpermissive -g -ggdb") +else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fpermissive -g -ggdb") + MESSAGE(STATUS "new gcc") +endif() +add_subdirectory(trantor) +SET(CMAKE_INSTALL_PREFIX /usr/local/drogon) +#INSTALL(FILES trantor.cfg DESTINATION conf) diff --git a/trantor b/trantor new file mode 160000 index 00000000..e4b80582 --- /dev/null +++ b/trantor @@ -0,0 +1 @@ +Subproject commit e4b8058270f8757678c7fb7aeceee0cd4acb6e19