Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c2f1d2f

Browse files
ilya-lavrenovrnugmanx
authored and
rnugmanx
committedAug 26, 2021
Moved gflags, preprocessing dependencies to root (openvinotoolkit#6309)
1 parent e2cfa9a commit c2f1d2f

File tree

409 files changed

+127
-139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

409 files changed

+127
-139
lines changed
 

‎.gitmodules

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
[submodule "inference-engine/thirdparty/ade"]
2-
path = inference-engine/thirdparty/ade
3-
url = https://github.com/opencv/ade.git
4-
ignore = dirty
51
[submodule "inference-engine/thirdparty/mkl-dnn"]
62
path = inference-engine/thirdparty/mkl-dnn
73
url = https://github.com/openvinotoolkit/oneDNN.git
84
ignore = dirty
9-
[submodule "inference-engine/samples/thirdparty/gflags"]
10-
path = inference-engine/samples/thirdparty/gflags
11-
url = https://github.com/gflags/gflags.git
12-
ignore = dirty
135
[submodule "thirdparty/xbyak"]
146
path = thirdparty/xbyak
157
url = https://github.com/herumi/xbyak.git
@@ -18,6 +10,14 @@
1810
path = thirdparty/zlib/zlib
1911
url = https://github.com/madler/zlib.git
2012
ignore = dirty
13+
[submodule "thirdparty/ade"]
14+
path = thirdparty/ade
15+
url = https://github.com/opencv/ade.git
16+
ignore = dirty
17+
[submodule "thirdparty/gflags"]
18+
path = thirdparty/gflags
19+
url = https://github.com/gflags/gflags.git
20+
ignore = dirty
2121
[submodule "thirdparty/gtest"]
2222
path = thirdparty/gtest
2323
url = https://github.com/openvinotoolkit/googletest.git

‎inference-engine/CMakeLists.txt

+28-69
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,28 @@ include(cmake/features.cmake)
1313
# resolving dependencies for the project
1414
include(cmake/dependencies.cmake)
1515

16-
function(ie_developer_export_targets)
17-
openvino_developer_export_targets(COMPONENT inference_engine TARGETS ${ARGN})
18-
endfunction()
19-
20-
function(ie_developer_export)
21-
set(all_dev_targets gflags ie_libraries)
22-
foreach(component IN LISTS openvino_export_components)
23-
export(TARGETS ${${component}} NAMESPACE IE::
24-
APPEND FILE "${CMAKE_BINARY_DIR}/${component}_dev_targets.cmake")
25-
list(APPEND all_dev_targets ${${component}})
26-
endforeach()
27-
28-
add_custom_target(ie_dev_targets ALL DEPENDS ${all_dev_targets})
29-
endfunction()
30-
3116
add_subdirectory(thirdparty)
32-
3317
add_subdirectory(src)
34-
3518
add_subdirectory(ie_bridges/c)
3619

37-
if(ENABLE_TESTS)
38-
add_subdirectory(tests_deprecated)
39-
add_subdirectory(tests)
20+
if(ENABLE_PYTHON)
21+
add_subdirectory(ie_bridges/python)
4022
endif()
4123

4224
add_subdirectory(tools)
25+
add_subdirectory(samples)
4326

44-
function(ie_build_samples)
45-
# samples should be build with the same flags as from OpenVINO package,
46-
# so unset all flags
47-
foreach(var CMAKE_CXX_FLAGS CMAKE_C_FLAGS CMAKE_CXX_STANDARD
48-
CMAKE_EXE_LINKER_FLAGS CMAKE_POLICY_DEFAULT_CMP0063
49-
CMAKE_CXX_VISIBILITY_PRESET CMAKE_C_VISIBILITY_PRESET
50-
CMAKE_VISIBILITY_INLINES_HIDDEN CMAKE_POSITION_INDEPENDENT_CODE
51-
THREADS_PREFER_PTHREAD_FLAG X86_64 X86 ARM AARCH64 LINUX
52-
MINGW64 CMAKE_BUILD_TYPE CMAKE_MACOSX_RPATH)
53-
unset(${var})
54-
endforeach()
55-
include("${IEDevScripts_DIR}/compile_flags/sanitizer.cmake")
56-
add_subdirectory(samples)
57-
endfunction()
27+
if(ENABLE_TESTS)
28+
add_subdirectory(tests_deprecated)
29+
add_subdirectory(tests)
30+
endif()
5831

59-
# gflags and format_reader targets are kept inside of samples directory and
60-
# they must be built even if samples build is disabled (required for tests and tools).
61-
ie_build_samples()
32+
#
33+
# Coverage
34+
#
6235

63-
if(ENABLE_PYTHON)
64-
add_subdirectory(ie_bridges/python)
36+
if(ENABLE_COVERAGE)
37+
include(cmake/coverage.cmake)
6538
endif()
6639

6740
#
@@ -70,19 +43,7 @@ endif()
7043

7144
# install C++ samples
7245

73-
ie_cpack_add_component(cpp_samples DEPENDS core)
74-
75-
install(DIRECTORY ../thirdparty/zlib
76-
DESTINATION ${IE_CPACK_IE_DIR}/samples/cpp/thirdparty
77-
COMPONENT cpp_samples
78-
USE_SOURCE_PERMISSIONS
79-
PATTERN .clang-format EXCLUDE)
80-
81-
install(DIRECTORY ../thirdparty/cnpy
82-
DESTINATION ${IE_CPACK_IE_DIR}/samples/cpp/thirdparty
83-
COMPONENT cpp_samples
84-
USE_SOURCE_PERMISSIONS
85-
PATTERN .clang-format EXCLUDE)
46+
ie_cpack_add_component(cpp_samples DEPENDS cpp_samples_deps core)
8647

8748
if(UNIX)
8849
install(DIRECTORY samples/
@@ -142,7 +103,7 @@ endif()
142103
# Developer package
143104
#
144105

145-
openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader gflags ie_samples_utils)
106+
openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader ie_samples_utils)
146107

147108
# for Template plugin
148109
if(NGRAPH_INTERPRETER_ENABLE)
@@ -153,36 +114,34 @@ function(ie_generate_dev_package_config)
153114
# dummy check that OpenCV is here
154115
find_package(OpenCV QUIET)
155116

156-
ie_developer_export()
117+
set(all_dev_targets gflags ie_libraries)
118+
foreach(component IN LISTS openvino_export_components)
119+
export(TARGETS ${${component}} NAMESPACE IE::
120+
APPEND FILE "${CMAKE_BINARY_DIR}/${component}_dev_targets.cmake")
121+
list(APPEND all_dev_targets ${${component}})
122+
endforeach()
123+
add_custom_target(ie_dev_targets ALL DEPENDS ${all_dev_targets})
157124

158125
configure_package_config_file("${InferenceEngine_SOURCE_DIR}/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in"
159-
"${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig.cmake"
160-
INSTALL_DESTINATION share # not used
161-
PATH_VARS "OpenVINO_MAIN_SOURCE_DIR;IE_MAIN_SOURCE_DIR;gflags_BINARY_DIR"
162-
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
126+
"${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig.cmake"
127+
INSTALL_DESTINATION share # not used
128+
PATH_VARS "OpenVINO_MAIN_SOURCE_DIR;IE_MAIN_SOURCE_DIR"
129+
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
163130

164131
configure_file("${IE_MAIN_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-version.cmake.in"
165-
"${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig-version.cmake"
166-
@ONLY)
132+
"${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig-version.cmake"
133+
@ONLY)
167134
endfunction()
168135

169136
ie_generate_dev_package_config()
170137

171-
#
172-
# Coverage
173-
#
174-
175-
if(ENABLE_COVERAGE)
176-
include(cmake/coverage.cmake)
177-
endif()
178-
179138
#
180139
# Add extra modules
181140
#
182141

183142
function(register_extra_modules)
184143
# post export
185-
ie_developer_export_targets(inference_engine)
144+
openvino_developer_export_targets(COMPONENT inference_engine TARGETS inference_engine)
186145
openvino_developer_export_targets(COMPONENT ngraph TARGETS ${NGRAPH_LIBRARIES})
187146

188147
set(InferenceEngineDeveloperPackage_DIR "${CMAKE_CURRENT_BINARY_DIR}/build-modules")

0 commit comments

Comments
 (0)