1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
|
From 8a5804c723c5bd396e5029f254f866f19a679cc5 Mon Sep 17 00:00:00 2001
From: Erin Park <erin.park@intel.com>
Date: Wed, 11 Sep 2019 09:04:23 -0700
Subject: [PATCH 1/7] R2 Build fixes
-Update to R3
-linux os-release name search
-Use system libraries for (OMP/TBB)
-Use system libraries for ngraph, ade, puigxml, gflags
-Turn on ENABLE_PYTHON
Upstream-Status: Pending [Taken from Clear Linux and updated to R3]
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com>
---
inference-engine/CMakeLists.txt | 4 +++
inference-engine/cmake/dependencies.cmake | 30 ++++++++++++----------
inference-engine/cmake/developer_package.cmake | 12 ++++-----
inference-engine/cmake/ie_parallel.cmake | 6 ++---
inference-engine/cmake/linux_name.cmake | 2 +-
inference-engine/samples/CMakeLists.txt | 2 --
.../src/inference_engine/CMakeLists.txt | 5 ++--
inference-engine/thirdparty/CMakeLists.txt | 9 -------
8 files changed, 34 insertions(+), 36 deletions(-)
diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt
index f41d9df..a282cb4 100644
--- a/inference-engine/CMakeLists.txt
+++ b/inference-engine/CMakeLists.txt
@@ -62,6 +62,10 @@ add_cpplint_target(sample_cpplint
EXCLUDE_PATTERNS "thirdparty/*" "pugixml/*")
if (ENABLE_PYTHON)
+ set(InferenceEngine_DIR "${CMAKE_BINARY_DIR}")
+
+ #to be able to link
+ set (LIB_FOLDER ${IE_MAIN_SOURCE_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib)
add_subdirectory(ie_bridges/python)
endif()
diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake
index 682f2e5..36c3f4d 100644
--- a/inference-engine/cmake/dependencies.cmake
+++ b/inference-engine/cmake/dependencies.cmake
@@ -51,11 +51,11 @@ if (THREADING STREQUAL "OMP")
ENVIRONMENT "OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
elseif(LINUX)
- RESOLVE_DEPENDENCY(OMP
- ARCHIVE_LIN "iomp.tgz"
- TARGET_PATH "${TEMP}/omp"
- ENVIRONMENT "OMP"
- VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
+ #RESOLVE_DEPENDENCY(OMP
+ # ARCHIVE_LIN "iomp.tgz"
+ # TARGET_PATH "${TEMP}/omp"
+ # ENVIRONMENT "OMP"
+ # VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
else(APPLE)
RESOLVE_DEPENDENCY(OMP
ARCHIVE_MAC "iomp_20190130_mac.tgz"
@@ -63,8 +63,10 @@ if (THREADING STREQUAL "OMP")
ENVIRONMENT "OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
endif()
- log_rpath_from_dir(OMP "${OMP}/lib")
- debug_message(STATUS "intel_omp=" ${OMP})
+ if (NOT LINUX)
+ log_rpath_from_dir(OMP "${OMP}/lib")
+ debug_message(STATUS "intel_omp=" ${OMP})
+ endif ()
endif ()
## TBB package
@@ -77,10 +79,10 @@ if (THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
ENVIRONMENT "TBBROOT"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
elseif(LINUX)
- RESOLVE_DEPENDENCY(TBB
- ARCHIVE_LIN "tbb2019_20181010_lin.tgz"
- TARGET_PATH "${TEMP}/tbb"
- ENVIRONMENT "TBBROOT")
+ #RESOLVE_DEPENDENCY(TBB
+ # ARCHIVE_LIN "tbb2019_20181010_lin.tgz"
+ # TARGET_PATH "${TEMP}/tbb"
+ # ENVIRONMENT "TBBROOT")
else(APPLE)
RESOLVE_DEPENDENCY(TBB
ARCHIVE_MAC "tbb2019_20190414_v1_mac.tgz"
@@ -88,8 +90,10 @@ if (THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
ENVIRONMENT "TBBROOT"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
endif()
- log_rpath_from_dir(TBB "${TBB}/lib")
- debug_message(STATUS "tbb=" ${TBB})
+ if (NOT LINUX)
+ log_rpath_from_dir(TBB "${TBB}/lib")
+ debug_message(STATUS "tbb=" ${TBB})
+ endif ()
endif ()
if (ENABLE_OPENCV)
diff --git a/inference-engine/cmake/developer_package.cmake b/inference-engine/cmake/developer_package.cmake
index a27143d..950ccf4 100644
--- a/inference-engine/cmake/developer_package.cmake
+++ b/inference-engine/cmake/developer_package.cmake
@@ -93,12 +93,12 @@ if(NOT UNIX)
set(LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
set(LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_DIRECTORY}) # compatibility issue: linux uses LIBRARY_OUTPUT_PATH, windows uses LIBRARY_OUTPUT_DIRECTORY
else()
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib)
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib)
- set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE})
- set(CMAKE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE})
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE})
- set(LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib)
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib)
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib)
+ set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE})
+ set(CMAKE_PDB_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE})
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE})
+ set(LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib)
set(LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_DIRECTORY}/lib)
endif()
diff --git a/inference-engine/cmake/ie_parallel.cmake b/inference-engine/cmake/ie_parallel.cmake
index 97e8c5e..9b03652 100644
--- a/inference-engine/cmake/ie_parallel.cmake
+++ b/inference-engine/cmake/ie_parallel.cmake
@@ -36,8 +36,8 @@ function(set_ie_threading_interface_for TARGET_NAME)
endif ()
if (NOT TBB_INCLUDE_DIRS OR NOT TBB_LIBRARIES_RELEASE)
- find_path(TBB_INCLUDE_DIRS tbb/tbb.h ${incl_path} NO_DEFAULT_PATH)
- find_library(TBB_LIBRARIES_RELEASE tbb ${lib_rel_path} NO_DEFAULT_PATH)
+ find_path(TBB_INCLUDE_DIRS tbb/tbb.h)
+ find_library(TBB_LIBRARIES_RELEASE tbb)
ext_message(STATUS "TBB include: ${TBB_INCLUDE_DIRS}")
ext_message(STATUS "TBB Release lib: ${TBB_LIBRARIES_RELEASE}")
if (NOT LINUX)
@@ -98,7 +98,7 @@ function(set_ie_threading_interface_for TARGET_NAME)
endif ()
if (NOT OMP_LIBRARIES_RELEASE)
- find_library(OMP_LIBRARIES_RELEASE ${omp_lib_name} ${lib_rel_path} NO_DEFAULT_PATH)
+ find_library(OMP_LIBRARIES_RELEASE ${omp_lib_name})
ext_message(STATUS "OMP Release lib: ${OMP_LIBRARIES_RELEASE}")
if (NOT LINUX)
find_library(OMP_LIBRARIES_DEBUG ${omp_lib_name} ${lib_dbg_path} NO_DEFAULT_PATH)
diff --git a/inference-engine/cmake/linux_name.cmake b/inference-engine/cmake/linux_name.cmake
index 6713808..7e5e47a 100644
--- a/inference-engine/cmake/linux_name.cmake
+++ b/inference-engine/cmake/linux_name.cmake
@@ -5,7 +5,7 @@
if (LINUX)
function(get_linux_name res_var)
if (NOT EXISTS "/etc/lsb-release")
- execute_process(COMMAND find -L /etc/ -maxdepth 1 -type f -name *-release -exec cat {} \;
+ execute_process(COMMAND find /usr/lib/ /etc/ -maxdepth 1 -type f -name *-release -exec cat {} \;
OUTPUT_VARIABLE release_data RESULT_VARIABLE result)
set(name_regex "NAME=\"([^ \"\n]*).*\"\n")
set(version_regex "VERSION=\"([0-9]+(\\.[0-9]+)?)[^\n]*\"")
diff --git a/inference-engine/samples/CMakeLists.txt b/inference-engine/samples/CMakeLists.txt
index d3a094c..884b0a6 100644
--- a/inference-engine/samples/CMakeLists.txt
+++ b/inference-engine/samples/CMakeLists.txt
@@ -91,8 +91,6 @@ set (GFLAGS_IS_SUBPROJECT TRUE)
set (HAVE_SYS_STAT_H 1)
set (HAVE_INTTYPES_H 1)
-add_subdirectory(thirdparty/gflags)
-
if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
index f4b34ad..2604c32 100644
--- a/inference-engine/src/inference_engine/CMakeLists.txt
+++ b/inference-engine/src/inference_engine/CMakeLists.txt
@@ -116,6 +116,7 @@ target_include_directories(${TARGET_NAME} PUBLIC ${PUBLIC_HEADERS_DIR}
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE "${IE_MAIN_SOURCE_DIR}/thirdparty/pugixml/src")
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE "${IE_MAIN_SOURCE_DIR}/thirdparty/ngraph/src")
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE "${IE_MAIN_SOURCE_DIR}/thirdparty/ocv")
+include_directories(${TARGET_NAME} "/usr/include/ngraph")
if(ENABLE_MKL_DNN)
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE "${IE_MAIN_SOURCE_DIR}/thirdparty/mkl-dnn/src/cpu/xbyak")
@@ -125,7 +126,7 @@ if(ENABLE_UNICODE_PATH_SUPPORT)
target_compile_definitions(${TARGET_NAME} PUBLIC ENABLE_UNICODE_PATH_SUPPORT)
endif()
-set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME})
+set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME} SOVERSION 1)
# Static library used for unit tests which are always built
@@ -159,7 +160,7 @@ if(ENABLE_UNICODE_PATH_SUPPORT)
target_compile_definitions(${TARGET_NAME}_s PUBLIC ENABLE_UNICODE_PATH_SUPPORT)
endif()
-set_target_properties(${TARGET_NAME}_s PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME}_s)
+set_target_properties(${TARGET_NAME}_s PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME}_s SOVERSION 1)
target_link_libraries(${TARGET_NAME}_s PRIVATE fluid
PRIVATE ngraph
diff --git a/inference-engine/thirdparty/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt
index 54de20f..4ea20f5 100644
--- a/inference-engine/thirdparty/CMakeLists.txt
+++ b/inference-engine/thirdparty/CMakeLists.txt
@@ -35,10 +35,6 @@ function(build_with_lto)
set(CMAKE_RANLIB "gcc-ranlib")
endif()
- add_subdirectory(pugixml)
- export(TARGETS pugixml NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets.cmake")
- export(TARGETS pugixml NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets_developer.cmake")
-
if (TARGET pugixml_mt)
export(TARGETS pugixml_mt NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets.cmake")
export(TARGETS pugixml_mt NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets_developer.cmake")
@@ -46,11 +42,6 @@ function(build_with_lto)
add_subdirectory(stb_lib)
- add_subdirectory(ade)
- export(TARGETS ade NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets_developer.cmake")
-
- include(ngraph.cmake)
-
add_subdirectory(fluid/modules/gapi)
export(TARGETS fluid NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets_developer.cmake")
endfunction()
--
2.7.4
|