diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 index d499b9c1..51405226 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,38 @@ 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) +project (DROGON C CXX) -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() +#EXEC_PROGRAM (gcc ARGS "--version | grep '^gcc'|awk '{print $3}' | sed s'/)//g'" OUTPUT_VARIABLE version) +#MESSAGE(STATUS "This is gcc version:: " ${version}) + +#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) + +#include_directories(${PROJECT_SOURCE_DIR}/src/base/codec ${PROJECT_SOURCE_DIR}/src/Terminus ${CMAKE_BINARY_DIR}/src/base/protobuf_message) + +aux_source_directory(${PROJECT_SOURCE_DIR}/drogon/src DIR_SRCS) + +#add_library(db ${DIR_DB_SRCS}) +add_executable(drogon ${DIR_SRCS}) +add_dependencies(drogon trantor) + +#if (version LESS 6.0.0) +# MESSAGE(STATUS "old gcc...") +# set (LIBCONFIG config++) +#else() +# MESSAGE(STATUS "new gcc...") +# set (LIBCONFIG libconfig++) +#endif() + +target_link_libraries(drogon trantor) +#crypt dl m pqxx pq hiredis mongocxx bsoncxx jsoncpp ${LIBCONFIG}) +INSTALL(TARGETS drogon DESTINATION bin) diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/drogon/src/main.cc b/drogon/src/main.cc new file mode 100755 index 00000000..a46866d9 --- /dev/null +++ b/drogon/src/main.cc @@ -0,0 +1,4 @@ +int main() +{ + return 0; +}