Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
opencv
Commits
5d369afe
Commit
5d369afe
authored
Nov 23, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9893 from mshabunin:add-modules-whitelist
parents
49a52801
5b17410f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+35
-0
No files found.
cmake/OpenCVModule.cmake
View file @
5d369afe
...
...
@@ -416,6 +416,41 @@ function(__ocv_resolve_dependencies)
set
(
HAVE_
${
m
}
ON CACHE INTERNAL
"Module
${
m
}
will be built in current configuration"
)
endforeach
()
# Whitelist feature
if
(
BUILD_LIST
)
# Prepare the list
string
(
REGEX REPLACE
"[ ,:]+"
";"
whitelist
"
${
BUILD_LIST
}
"
)
if
(
BUILD_opencv_world
)
list
(
APPEND whitelist world
)
endif
()
ocv_list_add_prefix
(
whitelist
"opencv_"
)
ocv_list_sort
(
whitelist
)
ocv_list_unique
(
whitelist
)
message
(
STATUS
"Using whitelist:
${
whitelist
}
"
)
# Expand the list
foreach
(
depth RANGE 10
)
set
(
new_whitelist
${
whitelist
}
)
foreach
(
m
${
whitelist
}
)
list
(
APPEND new_whitelist
${
OPENCV_MODULE_
${
m
}
_REQ_DEPS
}
)
list
(
APPEND new_whitelist
${
OPENCV_MODULE_
${
m
}
_PRIVATE_REQ_DEPS
}
)
endforeach
()
ocv_list_sort
(
new_whitelist
)
ocv_list_unique
(
new_whitelist
)
if
(
"
${
whitelist
}
"
STREQUAL
"
${
new_whitelist
}
"
)
break
()
endif
()
set
(
whitelist
"
${
new_whitelist
}
"
)
endforeach
()
# Disable modules not in whitelist
foreach
(
m
${
OPENCV_MODULES_BUILD
}
)
list
(
FIND whitelist
${
m
}
idx
)
if
(
idx EQUAL -1
)
message
(
STATUS
"Module
${
m
}
disabled by whitelist"
)
__ocv_module_turn_off
(
${
m
}
)
endif
()
endforeach
()
endif
()
# disable MODULES with unresolved dependencies
set
(
has_changes ON
)
while
(
has_changes
)
...
...
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