On Thu, Aug 23, 2018 at 8:02 PM, Craig Scott <craig.sc...@crascit.com> wrote:
> > > On Thu, Aug 23, 2018 at 4:40 AM, Brad King <brad.k...@kitware.com> wrote: > >> On 08/21/2018 05:04 PM, Craig Scott wrote: >> > A user has recently been asking about reducing the output coming from a >> > FetchContent population when nothing needs to be done >> > Because this is implemented as a sub-build, you always see the following >> > >> > -- Configuring done >> > -- Generating done >> > -- Build files have been written to: ... >> >> Isn't that output coming from the invocation here: >> >> https://gitlab.kitware.com/cmake/cmake/blob/v3.12.1/Modules/ >> FetchContent.cmake#L776-781 >> >> rather than inside ExternalProject? >> > > Yes, that is where I'd like to be able to use the proposed --quiet or > --silent option. > > > >> >> Why is that output not always captured? >> > > If you capture it, then you don't get to see it until the command has > completed. It can take non-trivial time and in some cases may require user > input (e.g. to enter a password for a private SSH key). If you captured the > output and the download hung for some reason, there would be no output to > give any indication of where the download was up to. For cases where you > don't expect problems, you can use the QUIET option and the output is > indeed captured and only output at the end. This is the default because > otherwise the output is rather noisy with all the ExternalProject step > logging. But for cases where you need to investigate problems, you don't > want the output captured. > > Now that I've said all that, I guess FetchContent could check if the > output of a QUIET run was just the above-mentioned three lines and drop > them to leave no output in that case. Might be the simpler solution. > Furthermore, for the second execute_process() call a few lines after the > one referenced above (which does the build stage of the sub-build), we > could potentially make use of the logging verbosity improvements in MR > 2129 <https://gitlab.kitware.com/cmake/cmake/merge_requests/2129> if/when > it is done to further minimise the output of the "nothing to do" case. > > Sorry, got my wires crossed a bit there. The QUIET option already fully absorbs the output unless there's an error. I missed this in the original issue that prompted this request. Let me go back to that issue and see if there's really anything needed here after all. -- Craig Scott Melbourne, Australia https://crascit.com New book released: Professional CMake: A Practical Guide <https://crascit.com/professional-cmake/>
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers