Merge topic 'ExternalProject-switch-ALWAYS'

a4605973 ExternalProject: Allow ALWAYS step property to be switched (#15368)
This commit is contained in:
Brad King 2015-01-26 09:51:57 -05:00 committed by CMake Topic Stage
commit a65f7944a0
1 changed files with 9 additions and 0 deletions

View File

@ -1456,6 +1456,15 @@ function(ExternalProject_Add_Step name step)
if(always)
set_property(SOURCE ${stamp_file} PROPERTY SYMBOLIC 1)
set(touch)
# Remove any existing stamp in case the option changed in an existing tree.
if(CMAKE_CONFIGURATION_TYPES)
foreach(cfg ${CMAKE_CONFIGURATION_TYPES})
string(REPLACE "/${CMAKE_CFG_INTDIR}" "/${cfg}" stamp_file_config "${stamp_file}")
file(REMOVE ${stamp_file_config})
endforeach()
else()
file(REMOVE ${stamp_file})
endif()
else()
set(touch ${CMAKE_COMMAND} -E touch ${stamp_file})
endif()