65 lines
1.0 KiB
CMake
65 lines
1.0 KiB
CMake
project(test)
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
set(CMAKE_BUILD_TYPE "Debug")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++11 -fsanitize=address -fno-omit-frame-pointer")
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11")
|
|
|
|
include_directories(
|
|
AFTER
|
|
../../a8engine
|
|
/usr/include/mysql
|
|
/usr/include/jsoncpp
|
|
/usr/include/hiredis
|
|
../../
|
|
.
|
|
)
|
|
|
|
link_directories(
|
|
/usr/lib64/mysql
|
|
/usr/local/lib
|
|
)
|
|
|
|
aux_source_directory(../../a8engine/a8
|
|
SRC_LIST
|
|
)
|
|
|
|
aux_source_directory(../../framework/cpp
|
|
SRC_LIST
|
|
)
|
|
|
|
aux_source_directory(.
|
|
SRC_LIST
|
|
)
|
|
|
|
set(EXECUTABLE_OUTPUT_PATH
|
|
${PROJECT_BINARY_DIR}/
|
|
)
|
|
|
|
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_DEBUG "_DEBUG")
|
|
|
|
add_executable(
|
|
test ${SRC_LIST}
|
|
)
|
|
|
|
# add_custom_target(script_pb_protocol ALL)
|
|
# add_custom_command(TARGET script_pb_protocol
|
|
# PRE_BUILD
|
|
# COMMAND python ../tools/scripts/construct/build_pb.py
|
|
# )
|
|
# add_dependencies(test script_pb_protocol)
|
|
|
|
target_link_libraries(
|
|
test
|
|
pthread
|
|
mysqlclient
|
|
protobuf
|
|
rt
|
|
crypto
|
|
ssl
|
|
jsoncpp
|
|
curl
|
|
hiredis
|
|
tinyxml2
|
|
)
|