You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/04/27 18:59:23 UTC

[GitHub] cjolivier01 closed pull request #10712: [MXNET-361] Fix cmake 3.11

cjolivier01 closed pull request #10712: [MXNET-361] Fix cmake 3.11
URL: https://github.com/apache/incubator-mxnet/pull/10712
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffa4d6549d6..363237f909e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -584,9 +584,12 @@ endif()
 
 set(MXNET_INSTALL_TARGETS mxnet)
 if(UNIX)
+  # Create dummy file since we want an empty shared library before linking
+  set(DUMMY_SOURCE ${CMAKE_BINARY_DIR}/dummy.c)
+  file(WRITE ${DUMMY_SOURCE} "")
   list(APPEND MXNET_INSTALL_TARGETS mxnet_static)
   add_library(mxnet_static STATIC ${SOURCE})
-  add_library(mxnet SHARED)
+  add_library(mxnet SHARED ${DUMMY_SOURCE})
   target_link_libraries(mxnet PRIVATE ${BEGIN_WHOLE_ARCHIVE} $<TARGET_FILE:mxnet_static> ${END_WHOLE_ARCHIVE})
   target_link_libraries(mxnet PRIVATE mxnet_static)
   set_target_properties(mxnet_static PROPERTIES OUTPUT_NAME mxnet)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services