diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index eae697560b..a9e51b7249 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -261,11 +261,19 @@ if(${TD_DARWIN}) endif(${TD_DARWIN}) add_subdirectory(zlib EXCLUDE_FROM_ALL) + +if(${TD_DARWIN}) + target_compile_options(zlibstatic PRIVATE -Wno-error=deprecated-non-prototype) +endif() target_include_directories( zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/zlib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/zlib ) + +if(${TD_DARWIN}) + target_compile_options(zlib PRIVATE -Wno-error=deprecated-non-prototype) +endif() target_include_directories( zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/zlib diff --git a/source/client/CMakeLists.txt b/source/client/CMakeLists.txt index bbd18892ab..6d5f006517 100644 --- a/source/client/CMakeLists.txt +++ b/source/client/CMakeLists.txt @@ -10,6 +10,10 @@ else() add_library(taos SHARED ${CLIENT_SRC}) endif() +if(${TD_DARWIN}) + target_compile_options(taos PRIVATE -Wno-error=deprecated-non-prototype) +endif() + INCLUDE_DIRECTORIES(jni) target_include_directories( @@ -46,6 +50,11 @@ set_target_properties( ) add_library(taos_static STATIC ${CLIENT_SRC}) + +if(${TD_DARWIN}) + target_compile_options(taos_static PRIVATE -Wno-error=deprecated-non-prototype) +endif() + target_include_directories( taos_static PUBLIC "${TD_SOURCE_DIR}/include/client" diff --git a/source/dnode/mgmt/mgmt_snode/CMakeLists.txt b/source/dnode/mgmt/mgmt_snode/CMakeLists.txt index 62dc41a0ae..8ebeafcbfb 100644 --- a/source/dnode/mgmt/mgmt_snode/CMakeLists.txt +++ b/source/dnode/mgmt/mgmt_snode/CMakeLists.txt @@ -1,5 +1,10 @@ aux_source_directory(src MGMT_SNODE) add_library(mgmt_snode STATIC ${MGMT_SNODE}) + +if(${TD_DARWIN}) + target_compile_options(mgmt_snode PRIVATE -Wno-error=deprecated-non-prototype) +endif() + target_include_directories( mgmt_snode PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" diff --git a/source/dnode/mgmt/mgmt_vnode/CMakeLists.txt b/source/dnode/mgmt/mgmt_vnode/CMakeLists.txt index 15b822ad92..bb433def6c 100644 --- a/source/dnode/mgmt/mgmt_vnode/CMakeLists.txt +++ b/source/dnode/mgmt/mgmt_vnode/CMakeLists.txt @@ -1,5 +1,10 @@ aux_source_directory(src MGMT_VNODE) add_library(mgmt_vnode STATIC ${MGMT_VNODE}) + +if(${TD_DARWIN}) + target_compile_options(mgmt_vnode PRIVATE -Wno-error=deprecated-non-prototype) +endif() + target_include_directories( mgmt_vnode PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" diff --git a/source/libs/function/CMakeLists.txt b/source/libs/function/CMakeLists.txt index d5c9cccc0e..6891653981 100644 --- a/source/libs/function/CMakeLists.txt +++ b/source/libs/function/CMakeLists.txt @@ -144,6 +144,11 @@ target_link_libraries( # SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/build/bin) add_executable(udfd src/udfd.c) + +if(${TD_DARWIN}) + target_compile_options(udfd PRIVATE -Wno-error=deprecated-non-prototype) +endif() + target_include_directories( udfd PUBLIC diff --git a/source/libs/sync/CMakeLists.txt b/source/libs/sync/CMakeLists.txt index 6025070cb7..57e1ec63b2 100644 --- a/source/libs/sync/CMakeLists.txt +++ b/source/libs/sync/CMakeLists.txt @@ -1,6 +1,10 @@ aux_source_directory(src SYNC_SRC) add_library(sync STATIC ${SYNC_SRC}) +if(${TD_DARWIN}) + target_compile_options(sync PRIVATE -Wno-error=deprecated-non-prototype) +endif() + target_link_libraries( sync PUBLIC common diff --git a/source/os/src/osString.c b/source/os/src/osString.c index 18da778227..7960f84369 100644 --- a/source/os/src/osString.c +++ b/source/os/src/osString.c @@ -17,10 +17,6 @@ #define _DEFAULT_SOURCE #include "os.h" -#ifndef DISALLOW_NCHAR_WITHOUT_ICONV -#include "iconv.h" -#endif - extern int wcwidth(wchar_t c); extern int wcswidth(const wchar_t *s, size_t n); diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 50a7fe8119..6d56aa7fe2 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -58,7 +58,7 @@ static void shellWriteHistory(); static void shellPrintError(TAOS_RES *tres, int64_t st); static bool shellIsCommentLine(char *line); static void shellSourceFile(const char *file); -static bool shellGetGrantInfo(char *buf); +static bool shellGetGrantInfo(char* buf); static void shellCleanup(void *arg); static void *shellCancelHandler(void *arg);