summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-29 12:55:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-29 12:55:17 (GMT)
commit9fc0453140b6d35af1dd627d4a2e0ea95a2feaff (patch)
tree43c7f2fcc3c449c7ca5caa789452c97f00c5b9b8 /Modules
parent41492c2d99b0e2c9bdc166af3b6eea8e3da95aa6 (diff)
parentda4705255e338d59d6d680e5f2198d4847209c15 (diff)
downloadCMake-9fc0453140b6d35af1dd627d4a2e0ea95a2feaff.zip
CMake-9fc0453140b6d35af1dd627d4a2e0ea95a2feaff.tar.gz
CMake-9fc0453140b6d35af1dd627d4a2e0ea95a2feaff.tar.bz2
Merge topic 'external-project-refactor-ep_get_complete_stampfile'
da470525 ExternalProject: Refactor code introducing _ep_get_complete_stampfile Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1323
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake16
1 files changed, 11 insertions, 5 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 912c5ac..76f5080 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1923,6 +1923,15 @@ function(_ep_get_step_stampfile name step stampfile_var)
endfunction()
+function(_ep_get_complete_stampfile name stampfile_var)
+ set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)
+ _ep_get_configuration_subdir_suffix(cfgdir)
+ set(stampfile "${cmf_dir}${cfgdir}/${name}-complete")
+
+ set(${stampfile_var} ${stampfile} PARENT_SCOPE)
+endfunction()
+
+
function(ExternalProject_Add_StepTargets name)
set(steps ${ARGN})
if(ARGC GREATER 1 AND "${ARGV1}" STREQUAL "NO_DEPENDS")
@@ -1952,10 +1961,7 @@ endfunction()
function(ExternalProject_Add_Step name step)
- set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)
- _ep_get_configuration_subdir_suffix(cfgdir)
-
- set(complete_stamp_file "${cmf_dir}${cfgdir}/${name}-complete")
+ _ep_get_complete_stampfile(${name} complete_stamp_file)
_ep_get_step_stampfile(${name} ${step} stamp_file)
_ep_parse_arguments(ExternalProject_Add_Step
@@ -2958,7 +2964,7 @@ function(ExternalProject_Add name)
# Add a custom target for the external project.
set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)
- set(complete_stamp_file "${cmf_dir}${cfgdir}/${name}-complete")
+ _ep_get_complete_stampfile(${name} complete_stamp_file)
# The "ALL" option to add_custom_target just tells it to not set the
# EXCLUDE_FROM_ALL target property. Later, if the EXCLUDE_FROM_ALL