You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tubemq.apache.org by GitBox <gi...@apache.org> on 2020/07/09 13:23:23 UTC

[GitHub] [incubator-tubemq] charlely commented on a change in pull request #197: [TUBEMQ-274]Support CMake compilation

charlely commented on a change in pull request #197:
URL: https://github.com/apache/incubator-tubemq/pull/197#discussion_r452213482



##########
File path: tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
##########
@@ -0,0 +1,30 @@
+cmake_minimum_required (VERSION 3.1)
+
+project (TubeMQ)
+
+
+INCLUDE_DIRECTORIES(include)
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/third_party/rapidjson/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/third_party/log4cplus/include)
+INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/third_party/log4cplus/include)
+LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/third_party/log4cplus/lib)
+
+ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(third_party)
+ADD_SUBDIRECTORY(example)
+
+
+if (UNIX)
+    SET(CMAKE_CXX_FLAGS_DEBUG   "-O1 -g -ggdb -D_DEBUG")
+    SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -g -ggdb -DNDEBUG")
+    SET(DEPENDENT_LIBRARIES log4cplus pthread)
+else (UNIX)

Review comment:
       The cmake syntax is like this




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org