Skip to content

Commit a9ddf12

Browse files
committed
Merge pull request opencv#14078 from alalek:test_python_from_modules
2 parents 39630e0 + a0a1fb5 commit a9ddf12

File tree

18 files changed

+97
-2
lines changed

18 files changed

+97
-2
lines changed

cmake/OpenCVUtils.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,3 +1777,22 @@ macro(ocv_git_describe var_name path)
17771777
set(${var_name} "unknown")
17781778
endif()
17791779
endmacro()
1780+
1781+
1782+
# ocv_update_file(filepath content [VERBOSE])
1783+
# - write content to file
1784+
# - will not change modification time in case when file already exists and content has not changed
1785+
function(ocv_update_file filepath content)
1786+
if(EXISTS "${filepath}")
1787+
file(READ "${filepath}" actual_content)
1788+
else()
1789+
set(actual_content "")
1790+
endif()
1791+
if("${actual_content}" STREQUAL "${content}")
1792+
if(";${ARGN};" MATCHES ";VERBOSE;")
1793+
message(STATUS "${filepath} contains the same content")
1794+
endif()
1795+
else()
1796+
file(WRITE "${filepath}" "${content}")
1797+
endif()
1798+
endfunction()

doc/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if(DOXYGEN_FOUND)
1515

1616
# not documented modules list
1717
set(blacklist "${DOXYGEN_BLACKLIST}")
18-
list(APPEND blacklist "ts" "java_bindings_generator" "java" "python_bindings_generator" "python2" "python3" "js" "world")
18+
list(APPEND blacklist "ts" "world")
1919
unset(CMAKE_DOXYGEN_TUTORIAL_CONTRIB_ROOT)
2020
unset(CMAKE_DOXYGEN_TUTORIAL_JS_ROOT)
2121

@@ -32,7 +32,16 @@ if(DOXYGEN_FOUND)
3232
set(refs_extra)
3333
set(deps)
3434
foreach(m ${OPENCV_MODULES_MAIN} ${OPENCV_MODULES_EXTRA})
35+
set(the_module "${m}")
36+
if(NOT the_module MATCHES "^opencv_")
37+
set(the_module "opencv_${m}")
38+
endif()
3539
list(FIND blacklist ${m} _pos)
40+
if(NOT EXISTS "${OPENCV_MODULE_${the_module}_LOCATION}/include"
41+
AND NOT EXISTS "${OPENCV_MODULE_${the_module}_LOCATION}/doc"
42+
)
43+
set(_pos -2) # blacklist
44+
endif()
3645
if(${_pos} EQUAL -1)
3746
list(APPEND CMAKE_DOXYGEN_ENABLED_SECTIONS "HAVE_opencv_${m}")
3847
# include folder

0 commit comments

Comments
 (0)