提交 6e97dce1 编写于 作者: S Shengliang Guan

TD-4088

上级 274d420f
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine)
IF (TD_DARWIN)
IF (TD_LINUX)
ADD_SUBDIRECTORY(src/linux)
ELSEIF (TD_DARWIN)
ADD_SUBDIRECTORY(src/darwin)
ELSEIF (TD_WINDOWS)
ADD_SUBDIRECTORY(src/windows)
......
......@@ -2,4 +2,4 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine)
AUX_SOURCE_DIRECTORY(. SRC)
ADD_LIBRARY(osd ${SRC})
ADD_LIBRARY(osdarwin ${SRC})
......@@ -10,12 +10,12 @@ SET_SOURCE_FILES_PROPERTIES(osCoredump.c PROPERTIES COMPILE_FLAGS -w)
ADD_LIBRARY(os ${SRC})
IF (TD_LINUX)
TARGET_LINK_LIBRARIES(os m rt z)
TARGET_LINK_LIBRARIES(os oslinux)
IF (TD_ARM_32 OR TD_LINUX_32)
TARGET_LINK_LIBRARIES(os atomic)
ENDIF ()
ELSEIF (TD_DARWIN)
TARGET_LINK_LIBRARIES(os osd)
TARGET_LINK_LIBRARIES(os osdarwin)
ELSEIF (TD_WINDOWS)
TARGET_LINK_LIBRARIES(os osw)
TARGET_LINK_LIBRARIES(os oswindows)
ENDIF ()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine)
AUX_SOURCE_DIRECTORY(. SRC)
ADD_LIBRARY(oslinux ${SRC})
TARGET_LINK_LIBRARIES(oslinux m rt z)
\ No newline at end of file
......@@ -40,9 +40,8 @@ void osInit() {
strcpy(tsOsName, "Linux");
}
char cmdline[1024];
char* taosGetCmdlineByPID(int pid) {
static char cmdline[1024];
sprintf(cmdline, "/proc/%d/cmdline", pid);
FILE* f = fopen(cmdline, "r");
if (f) {
......
......@@ -2,6 +2,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine)
AUX_SOURCE_DIRECTORY(. SRC)
ADD_LIBRARY(osw ${SRC})
ADD_LIBRARY(oswindows ${SRC})
TARGET_LINK_LIBRARIES(osw winmm IPHLPAPI ws2_32 MsvcLibXw)
TARGET_LINK_LIBRARIES(oswindows winmm IPHLPAPI ws2_32 MsvcLibXw)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册