Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tvm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cld
ml
tvm
Commits
90554d08
Commit
90554d08
authored
7 years ago
by
健美猫
Committed by
Tianqi Chen
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Install nnvm lib and haders. Offer choice to build static or shared lib. (#146)
parent
f5bb0e02
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nnvm/CMakeLists.txt
+23
-2
23 additions, 2 deletions
nnvm/CMakeLists.txt
with
23 additions
and
2 deletions
nnvm/CMakeLists.txt
+
23
−
2
View file @
90554d08
...
...
@@ -17,6 +17,10 @@ set(nnvm_LINKER_LIBS "")
add_definitions
(
-DNNVM_EXPORTS
)
# Build a shared lib (libnnvm.so) by default
option
(
BUILD_SHARED_NNVM
"Build a shared nnvm lib"
ON
)
option
(
BUILD_STATIC_NNVM
"Build a static nnvm lib"
OFF
)
# compile
if
(
MSVC
)
add_definitions
(
-DDMLC_USE_CXX11
)
...
...
@@ -64,8 +68,15 @@ elseif(DMLC_CORE_PATH)
include_directories
(
${
DMLC_CORE_PATH
}
/include
)
endif
()
add_library
(
nnvm SHARED
${
SOURCE
}
)
target_link_libraries
(
nnvm
${
nnvm_LINKER_LIBS
}
)
if
(
BUILD_SHARED_NNVM
)
add_library
(
nnvm SHARED
${
SOURCE
}
)
target_link_libraries
(
nnvm
${
nnvm_LINKER_LIBS
}
)
endif
()
if
(
BUILD_STATIC_NNVM
)
add_library
(
nnvm_static STATIC
${
SOURCE
}
)
target_link_libraries
(
nnvm_static
${
nnvm_LINKER_LIBS
}
)
set_target_properties
(
nnvm_static PROPERTIES OUTPUT_NAME
"nnvm"
)
endif
()
if
(
INSTALL_INCLUDE_DIR
)
add_custom_command
(
TARGET nnvm POST_BUILD
...
...
@@ -74,6 +85,16 @@ if(INSTALL_INCLUDE_DIR)
)
endif
()
# ---[ Install lib, header and docs
if
(
BUILD_SHARED_NNVM
)
install
(
TARGETS nnvm LIBRARY DESTINATION lib
)
endif
()
if
(
BUILD_STATIC_NNVM
)
install
(
TARGETS nnvm_static ARCHIVE DESTINATION lib
)
endif
()
install
(
DIRECTORY include DESTINATION .
)
install
(
DIRECTORY docs DESTINATION .
)
# ---[ Linter target
if
(
MSVC
)
find_package
(
PythonInterp 2
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment