mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
ExternalProject: add LOG_PATCH option to log the patch command
Most steps support the logging into a file but the patch command is a notable exception. This commit adds the LOG_PATCH options that acts as the other LOG_* options.
This commit is contained in:
@@ -877,6 +877,7 @@ syn keyword cmakeKWExternalProject contained
|
||||
\ LOG_DOWNLOAD
|
||||
\ LOG_INSTALL
|
||||
\ LOG_MERGED_STDOUTERR
|
||||
\ LOG_PATCH
|
||||
\ LOG_TEST
|
||||
\ LOG_UPDATE
|
||||
\ MAKE_EXE
|
||||
|
||||
@@ -3,3 +3,6 @@ ExternalProject-log-options
|
||||
|
||||
* The :module:`ExternalProject` module :command:`ExternalProject_Add` command
|
||||
gained ``LOG_DIR`` and ``LOG_MERGED_STDOUTERR`` options to control logging.
|
||||
|
||||
* The :module:`ExternalProject` module :command:`ExternalProject_Add` command
|
||||
gained ``LOG_PATCH`` to optionally log the patch step.
|
||||
|
||||
@@ -532,6 +532,9 @@ External Project Definition
|
||||
``LOG_UPDATE <bool>``
|
||||
When enabled, the output of the update step is logged to files.
|
||||
|
||||
``LOG_PATCH <bool>``
|
||||
When enabled, the output of the patch step is logged to files.
|
||||
|
||||
``LOG_CONFIGURE <bool>``
|
||||
When enabled, the output of the configure step is logged to files.
|
||||
|
||||
@@ -2760,10 +2763,18 @@ function(_ep_add_patch_command name)
|
||||
set(work_dir ${source_dir})
|
||||
endif()
|
||||
|
||||
get_property(log TARGET ${name} PROPERTY _EP_LOG_PATCH)
|
||||
if(log)
|
||||
set(log LOG 1)
|
||||
else()
|
||||
set(log "")
|
||||
endif()
|
||||
|
||||
ExternalProject_Add_Step(${name} patch
|
||||
COMMAND ${cmd}
|
||||
WORKING_DIRECTORY ${work_dir}
|
||||
DEPENDEES download
|
||||
${log}
|
||||
)
|
||||
endfunction()
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ ExternalProject_Add(${proj}
|
||||
-DTEST_LIST:STRING=A::B::C
|
||||
INSTALL_COMMAND ""
|
||||
LOG_CONFIGURE 1
|
||||
LOG_PATCH 1
|
||||
)
|
||||
set_property(TARGET ${proj} PROPERTY FOLDER "Local/TAR")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user