Changeset 292286 in webkit
- Timestamp:
- Apr 4, 2022, 4:17:51 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Source/cmake/FindGIDocgen.cmake (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r292285 r292286 1 2022-04-04 Adrian Perez de Castro <aperez@igalia.com> 2 3 [CMake] Provide better messages when gi-docgen cannot be found 4 https://bugs.webkit.org/show_bug.cgi?id=238729 5 6 Reviewed by Carlos Garcia Campos. 7 8 When gi-docgen cannot be found, or cannot be executed, provide better error messages 9 than those provided by CMake. While at it, make the messages mention how gi-docgen 10 can be installed inside the WebKit source tree to be used for the build. 11 12 * Source/cmake/FindGIDocgen.cmake: 13 1 14 2022-04-04 Miguel Gomez <magomez@igalia.com> 2 15 -
trunk/Source/cmake/FindGIDocgen.cmake
r292263 r292286 70 70 "${CMAKE_SOURCE_DIR}/gi-docgen" 71 71 DOC "Path to the gi-docgen program" 72 REQUIRED73 72 ) 74 73 75 execute_process( 76 COMMAND ${GIDocgen_EXE} --version 77 OUTPUT_VARIABLE GIDocgen_VERSION 78 OUTPUT_STRIP_TRAILING_WHITESPACE 79 COMMAND_ERROR_IS_FATAL ANY 80 ERROR_QUIET 81 ) 74 75 if (GIDocgen_FIND_REQUIRED) 76 set(_GIDocgen_MSGLEVEL FATAL_ERROR) 77 else () 78 set(_GIDocgen_MSGLEVEL WARNING) 79 endif () 80 81 if (NOT GIDocgen_EXE) 82 message(${_GIDocgen_MSGLEVEL} 83 "Could not find gi-docgen. If your system does not provide a package " 84 "the following commands can be used to install it inside the WebKit " 85 "source tree, where it will be found automatically:\n" 86 " virtualenv gi-docgen ${CMAKE_SOURCE_DIR}/gi-docgen\n" 87 " ${CMAKE_SOURCE_DIR}/gi-docgen/bin/pip install gi-docgen\n" 88 "Another option is unpacking a gi-docgen release at the same location " 89 "but in this case dependencies will not be automatically installed.\n" 90 ) 91 elseif (GIDocgen_EXE) 92 execute_process( 93 COMMAND ${GIDocgen_EXE} --version 94 OUTPUT_VARIABLE GIDocgen_VERSION 95 OUTPUT_STRIP_TRAILING_WHITESPACE 96 RESULT_VARIABLE _GIDocgen_CMDSTATUS 97 ERROR_QUIET 98 ) 99 set(GIDocgen_VERSION "${GIDocgen_VERSION}" CACHE INTERNAL "") 100 if (NOT ${_GIDocgen_CMDSTATUS} EQUAL 0) 101 message(${_GIDocgen_MSGLEVEL} 102 "Could not execute ${GIDocgen_EXE}. This typically signals an " 103 "incorrect installation. You may want to run it by hand for " 104 "troubleshooting, the re-run CMake again.\n" 105 ) 106 endif () 107 endif () 82 108 83 109 include(FindPackageHandleStandardArgs) 84 110 find_package_handle_standard_args(GIDocgen 85 111 FOUND_VAR GIDocgen_FOUND 86 REQUIRED_VARS GIDocgen_EXE 112 REQUIRED_VARS GIDocgen_EXE GIDocgen_VERSION 87 113 VERSION_VAR GIDocgen_VERSION 88 114 )
Note:
See TracChangeset
for help on using the changeset viewer.