This is an automated email from the ASF dual-hosted git repository.
cjolivier01 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 28bc3c2 Ability to not build examples during the build of the cpp
package. (#9832)
28bc3c2 is described below
commit 28bc3c2b537c006d9db925245e23be653213e92d
Author: Viacheslav Kovalevskyi <[email protected]>
AuthorDate: Tue Feb 20 13:21:58 2018 -0800
Ability to not build examples during the build of the cpp package. (#9832)
---
cpp-package/CMakeLists.txt | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/cpp-package/CMakeLists.txt b/cpp-package/CMakeLists.txt
index 890a441..f7fbc77 100644
--- a/cpp-package/CMakeLists.txt
+++ b/cpp-package/CMakeLists.txt
@@ -1,21 +1,23 @@
if(USE_CPP_PACKAGE)
-set(CPP_PACKAGE_OP_H_HEADER ${CMAKE_CURRENT_LIST_DIR}/include/mxnet-cpp/op.h)
+ set(CPP_PACKAGE_OP_H_HEADER ${CMAKE_CURRENT_LIST_DIR}/include/mxnet-cpp/op.h)
-if(MSVC)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
-endif(MSVC)
+ if(MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
+ endif(MSVC)
-add_custom_target(
- cpp_package_op_h ALL
- BYPRODUCTS ${CPP_PACKAGE_OP_H_HEADER}
- MAIN_DEPENDENCY mxnet
- DEPENDS mxnet ${CMAKE_CURRENT_SOURCE_DIR}/scripts/OpWrapperGenerator.py
- COMMAND echo "Running: OpWrapperGenerator.py"
- COMMAND python OpWrapperGenerator.py $<TARGET_FILE:mxnet>
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts
-)
+ add_custom_target(
+ cpp_package_op_h ALL
+ BYPRODUCTS ${CPP_PACKAGE_OP_H_HEADER}
+ MAIN_DEPENDENCY mxnet
+ DEPENDS mxnet ${CMAKE_CURRENT_SOURCE_DIR}/scripts/OpWrapperGenerator.py
+ COMMAND echo "Running: OpWrapperGenerator.py"
+ COMMAND python OpWrapperGenerator.py $<TARGET_FILE:mxnet>
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts
+ )
-add_subdirectory(example)
+ if(NOT DO_NOT_BUILD_EXAMPLES)
+ add_subdirectory(example)
+ endif()
endif()
--
To stop receiving notification emails like this one, please contact
[email protected].