Skip to content

Conversation

jacquesqiao
Copy link
Member

@jacquesqiao jacquesqiao commented Jun 20, 2017

1, add WITH_Go to control build go lib into _swig_paddle.so.
2, temporarily disable go master because of some problem.

if(APPLE)
set(LIB_NAME "lib${NAME}.dylib")
# set(LIB_NAME "lib${NAME}.dylib")
set(LIB_NAME "lib${NAME}.so")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compile library with .so suffix in Apple system, it will still generate apple arch binary but with .so suffix, is it runnable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, this is not a problem, we use _swig_paddle.so now, but I will not change this place in this pr, we can discuss it later.

CMakeLists.txt Outdated
add_subdirectory(go/pserver/cclient)

if(WITH_Go)
#add_subdirectory(go/pserver/cclient)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's replace comment cmake code with TODO item. thanks

add_simple_unittest(parameter_optimizer_test)
if(WITH_TESTING)
add_simple_unittest(serialization_test)
add_simple_unittest(parameter_optimizer_test)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

CMakeLists.txt Outdated
option(COVERALLS_UPLOAD "Package code coverage data to coveralls" OFF)
option(ON_TRAVIS "Exclude special unit test on Travis CI" OFF)
option(WITH_C_API "Compile PaddlePaddle with C-API(Prediction)" OFF)
option(WITH_Go "Compile PaddlePaddle with Go)" OFF)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


if(NOT WITH_Go)
add_definitions(-DPADDLE_WITHOUT_GO)
endif()
Copy link
Contributor

@gangliao gangliao Jun 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unified with other macros.

if(WITH_GOLANG)
      add_definitions(-DPADDLE_WITH_GOLANG)
endif()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

CMakeLists.txt Outdated
add_subdirectory(go/pserver/cclient)

if(WITH_Go)
#add_subdirectory(go/pserver/cclient)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

DEPENDS ${filename} ${external_project_dependencies})
endforeach()

include_directories(${CMAKE_CURRENT_BINARY_DIR}/proto)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because this dir is not exist

CMakeLists.txt Outdated
include_directories("${PROJ_ROOT}")
include_directories("${PROJ_ROOT}/paddle/cuda/include")
include_directories("${CMAKE_CURRENT_BINARY_DIR}/proto")
include_directories("${CMAKE_BINARY_DIR}/go/pserver/cclient")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{CMAKE_BINARY_DIR} -> ${CMAKE_CURRENT_BINARY_DIR}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMAKE_CURRENT_BINARY_DIR是当前便以文件所在目录,CMAKE_BINARY_DIR 是编译根目录,CMAKE_BINARY_DIR是不是更容易保证正确性?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jacquesqiao jacquesqiao changed the title Fix go Add WITH_GOLANG to control the link of go lib Jun 20, 2017
Copy link
Contributor

@gangliao gangliao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dzhwinter dzhwinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants