|
|
@@ -1,3 +1,5 @@
|
|
|
+add_definitions(-DHV_SOURCE=1)
|
|
|
+
|
|
|
aux_source_directory(../base BASE_SRCS)
|
|
|
aux_source_directory(../utils UTILS_SRCS)
|
|
|
aux_source_directory(../event EVENT_SRCS)
|
|
|
@@ -7,17 +9,17 @@ aux_source_directory(../http/server HTTP_SERVER_SRCS)
|
|
|
aux_source_directory(../consul CONSUL_SRCS)
|
|
|
aux_source_directory(httpd HTTPD_SRCS)
|
|
|
|
|
|
-add_executable(test hmain_test.cpp ${BASE_SRCS} ${UTILS_SRCS})
|
|
|
-target_include_directories(test PRIVATE .. ../base ../utils)
|
|
|
-target_link_libraries(test ${LIBS})
|
|
|
+add_executable(hmain_test hmain_test.cpp ${BASE_SRCS} ${UTILS_SRCS})
|
|
|
+target_include_directories(hmain_test PRIVATE .. ../base ../utils)
|
|
|
+target_link_libraries(hmain_test ${LIBS})
|
|
|
|
|
|
-add_executable(timer htimer_test.c ${BASE_SRCS} ${EVENT_SRCS})
|
|
|
-target_include_directories(timer PRIVATE .. ../base ../event)
|
|
|
-target_link_libraries(timer ${LIBS})
|
|
|
+add_executable(htimer_test htimer_test.c ${BASE_SRCS} ${EVENT_SRCS})
|
|
|
+target_include_directories(htimer_test PRIVATE .. ../base ../event)
|
|
|
+target_link_libraries(htimer_test ${LIBS})
|
|
|
|
|
|
-add_executable(loop hloop_test.c ${BASE_SRCS} ${EVENT_SRCS})
|
|
|
-target_include_directories(loop PRIVATE .. ../base ../event)
|
|
|
-target_link_libraries(loop ${LIBS})
|
|
|
+add_executable(hloop_test hloop_test.c ${BASE_SRCS} ${EVENT_SRCS})
|
|
|
+target_include_directories(hloop_test PRIVATE .. ../base ../event)
|
|
|
+target_link_libraries(hloop_test ${LIBS})
|
|
|
|
|
|
add_executable(tcp tcp.c ${BASE_SRCS} ${EVENT_SRCS})
|
|
|
target_include_directories(tcp PRIVATE .. ../base ../event)
|
|
|
@@ -46,14 +48,14 @@ target_include_directories(curl PRIVATE .. ../base ../utils ../http ../http/clie
|
|
|
target_link_libraries(curl ${LIBS})
|
|
|
|
|
|
add_executable(consul_cli consul_cli.cpp ${BASE_SRCS} ${UTILS_SRCS} ${HTTP_SRCS} ${HTTP_CLIENT_SRCS} ${CONSUL_SRCS})
|
|
|
-target_compile_definitions(consul_cli PRIVATE -DPRINT_DEBUG)
|
|
|
+target_compile_definitions(consul_cli PRIVATE PRINT_DEBUG)
|
|
|
target_include_directories(consul_cli PRIVATE .. ../base ../utils ../http ../http/client ../consul)
|
|
|
target_link_libraries(consul_cli ${LIBS})
|
|
|
|
|
|
add_custom_target(examples DEPENDS
|
|
|
- test
|
|
|
- timer
|
|
|
- loop
|
|
|
+ hmain_test
|
|
|
+ htimer_test
|
|
|
+ hloop_test
|
|
|
tcp
|
|
|
udp
|
|
|
nc
|