Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
2b7e74e5
Commit
2b7e74e5
authored
Feb 16, 2019
by
Sang Ik Lee
Committed by
Robert Kimball
Feb 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMake: Read tbb library version on Linux. (#2471)
parent
ede9720c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
external_tbb.cmake
cmake/external_tbb.cmake
+20
-5
No files found.
cmake/external_tbb.cmake
View file @
2b7e74e5
...
...
@@ -50,13 +50,28 @@ if(NGRAPH_TBB_ENABLE)
set
(
TBB_LIB_NAME tbb
)
set
(
TBB_BUILDDIR_NAME tbb_release
)
endif
()
install
(
DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/tbb_build/
${
TBB_BUILDDIR_NAME
}
/
DESTINATION
${
NGRAPH_INSTALL_LIB
}
FILES_MATCHING REGEX
"/
${
CMAKE_SHARED_LIBRARY_PREFIX
}${
TBB_LIB_NAME
}${
CMAKE_SHARED_LIBRARY_SUFFIX
}
(
\\
.[0-9]+)*$"
)
set
(
TBB_BUILD_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/tbb_build/
${
TBB_BUILDDIR_NAME
}
)
set
(
TBB_LIB
${
CMAKE_SHARED_LIBRARY_PREFIX
}${
TBB_LIB_NAME
}${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
file
(
COPY
${
TBB_BUILD_DIR
}
/
${
TBB_LIB
}
DESTINATION
${
NGRAPH_BUILD_DIR
}
)
if
(
LINUX
)
execute_process
(
COMMAND grep TBB_COMPATIBLE_INTERFACE_VERSION
${
TBB_ROOT
}
/include/tbb/tbb_stddef.h OUTPUT_VARIABLE TBB_SOVER_LINE
)
string
(
REGEX MATCH
"[0-9.]+"
TBB_SOVER
${
TBB_SOVER_LINE
}
)
message
(
STATUS
"TBB so version:
${
TBB_SOVER
}
"
)
file
(
COPY
${
TBB_BUILD_DIR
}
/
${
TBB_LIB
}
.
${
TBB_SOVER
}
DESTINATION
${
NGRAPH_BUILD_DIR
}
)
endif
()
install
(
FILES
${
NGRAPH_BUILD_DIR
}
/
${
TBB_LIB
}
DESTINATION
${
NGRAPH_INSTALL_LIB
}
)
if
(
LINUX
)
install
(
FILES
${
NGRAPH_BUILD_DIR
}
/
${
TBB_LIB
}
.
${
TBB_SOVER
}
DESTINATION
${
NGRAPH_INSTALL_LIB
}
)
endif
()
add_library
(
libtbb INTERFACE
)
target_link_libraries
(
libtbb INTERFACE
${
CMAKE_CURRENT_BINARY_DIR
}
/tbb_build/
${
TBB_BUILDDIR_NAME
}
/
${
CMAKE_SHARED_LIBRARY_PREFIX
}${
TBB_LIB_NAME
}${
CMAKE_SHARED_LIBRARY_SUFFIX
}
${
NGRAPH_BUILD_DIR
}
/
${
TBB_LIB
}
)
target_include_directories
(
libtbb SYSTEM INTERFACE
${
TBB_ROOT
}
/include
)
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment