You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by cj...@apache.org on 2018/04/27 18:59:27 UTC
[incubator-mxnet] branch v1.2.0 updated: Fix cmake 3.11 (#10712)
This is an automated email from the ASF dual-hosted git repository.
cjolivier01 pushed a commit to branch v1.2.0
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/v1.2.0 by this push:
new 90e93db Fix cmake 3.11 (#10712)
90e93db is described below
commit 90e93db873606a7e1c7db2b619f720e4abbcfa15
Author: Marco de Abreu <ma...@users.noreply.github.com>
AuthorDate: Fri Apr 27 11:59:22 2018 -0700
Fix cmake 3.11 (#10712)
---
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffa4d65..363237f 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)
--
To stop receiving notification emails like this one, please contact
cjolivier01@apache.org.