summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Auxiliary/vim/syntax/cmake.vim1
-rw-r--r--Help/release/dev/ExternalProject-log-options.rst3
-rw-r--r--Modules/ExternalProject.cmake11
-rw-r--r--Tests/ExternalProjectLocal/CMakeLists.txt1
4 files changed, 16 insertions, 0 deletions
diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim
index 25384e4..d4d0edf 100644
--- a/Auxiliary/vim/syntax/cmake.vim
+++ b/Auxiliary/vim/syntax/cmake.vim
@@ -877,6 +877,7 @@ syn keyword cmakeKWExternalProject contained
\ LOG_DOWNLOAD
\ LOG_INSTALL
\ LOG_MERGED_STDOUTERR
+ \ LOG_PATCH
\ LOG_TEST
\ LOG_UPDATE
\ MAKE_EXE
diff --git a/Help/release/dev/ExternalProject-log-options.rst b/Help/release/dev/ExternalProject-log-options.rst
index 2fc4c4f..88bc799 100644
--- a/Help/release/dev/ExternalProject-log-options.rst
+++ b/Help/release/dev/ExternalProject-log-options.rst
@@ -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.
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index a8c31ed..93cd74a 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -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()
diff --git a/Tests/ExternalProjectLocal/CMakeLists.txt b/Tests/ExternalProjectLocal/CMakeLists.txt
index 5b94163..55fd713 100644
--- a/Tests/ExternalProjectLocal/CMakeLists.txt
+++ b/Tests/ExternalProjectLocal/CMakeLists.txt
@@ -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")