init project
This commit is contained in:
parent
e3f56d75aa
commit
81ef7d0392
|
@ -1,16 +1,38 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
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)
|
#EXEC_PROGRAM (gcc ARGS "--version | grep '^gcc'|awk '{print $3}' | sed s'/)//g'" OUTPUT_VARIABLE version)
|
||||||
MESSAGE(STATUS "old gcc")
|
#MESSAGE(STATUS "This is gcc version:: " ${version})
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fpermissive -g -ggdb")
|
|
||||||
else()
|
#if (version LESS 6.0.0)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fpermissive -g -ggdb")
|
# MESSAGE(STATUS "old gcc")
|
||||||
MESSAGE(STATUS "new gcc")
|
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fpermissive -g -ggdb")
|
||||||
endif()
|
#else()
|
||||||
|
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fpermissive -g -ggdb")
|
||||||
|
# MESSAGE(STATUS "new gcc")
|
||||||
|
#endif()
|
||||||
add_subdirectory(trantor)
|
add_subdirectory(trantor)
|
||||||
|
|
||||||
SET(CMAKE_INSTALL_PREFIX /usr/local/drogon)
|
SET(CMAKE_INSTALL_PREFIX /usr/local/drogon)
|
||||||
#INSTALL(FILES trantor.cfg DESTINATION conf)
|
#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)
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue