提交 2b22871d 编写于 作者: 乔龙飞 提交者: GitHub

Merge pull request #2329 from helinwang/mac

fix cclient build on mac, and test warnings
...@@ -4,5 +4,8 @@ include_directories(${CMAKE_BINARY_DIR}) ...@@ -4,5 +4,8 @@ include_directories(${CMAKE_BINARY_DIR})
add_executable(main main.c) add_executable(main main.c)
add_dependencies(main client) add_dependencies(main client)
set (CMAKE_EXE_LINKER_FLAGS "-pthread")
if(APPLE)
set(CMAKE_EXE_LINKER_FLAGS "-framework CoreFoundation -framework Security")
endif()
target_link_libraries(main ${CMAKE_BINARY_DIR}/libclient.a) target_link_libraries(main ${CMAKE_BINARY_DIR}/libclient.a)
...@@ -17,7 +17,7 @@ retry: ...@@ -17,7 +17,7 @@ retry:
paddle_parameter param; paddle_parameter param;
char name_a[] = "param_a"; char name_a[] = "param_a";
char name_b[] = "param_b"; char name_b[] = "param_b";
char content[] = {0x00, 0x11, 0x22}; unsigned char content[] = {0x00, 0x11, 0x22};
param.element_type = PADDLE_ELEMENT_TYPE_FLOAT32; param.element_type = PADDLE_ELEMENT_TYPE_FLOAT32;
param.name = name_a; param.name = name_a;
param.content = content; param.content = content;
...@@ -39,7 +39,7 @@ retry: ...@@ -39,7 +39,7 @@ retry:
fail(); fail();
} }
char content[] = {0x00, 0x11, 0x22}; unsigned char content[] = {0x00, 0x11, 0x22};
paddle_gradient grads[2] = { paddle_gradient grads[2] = {
{"param_a", PADDLE_ELEMENT_TYPE_INT32, content, 3}, {"param_a", PADDLE_ELEMENT_TYPE_INT32, content, 3},
{"param_b", PADDLE_ELEMENT_TYPE_FLOAT32, content, 3}}; {"param_b", PADDLE_ELEMENT_TYPE_FLOAT32, content, 3}};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册