mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 14:19:59 -05:00
ExternalProject: Minor cleanup to use more convenient commands
There is no effective functional change with this commit. It is mostly just to simplify readability.
This commit is contained in:
@@ -1466,9 +1466,8 @@ function(_ep_write_downloadfile_script
|
|||||||
set(HTTP_HEADERS_ARGS "")
|
set(HTTP_HEADERS_ARGS "")
|
||||||
if(NOT http_headers STREQUAL "")
|
if(NOT http_headers STREQUAL "")
|
||||||
foreach(header ${http_headers})
|
foreach(header ${http_headers})
|
||||||
set(
|
string(PREPEND HTTP_HEADERS_ARGS
|
||||||
HTTP_HEADERS_ARGS
|
"HTTPHEADER \"${header}\"\n "
|
||||||
"HTTPHEADER \"${header}\"\n ${HTTP_HEADERS_ARGS}"
|
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
@@ -2035,9 +2034,11 @@ function(_ep_step_add_target name step no_deps)
|
|||||||
add_custom_target(${name}-${step}
|
add_custom_target(${name}-${step}
|
||||||
DEPENDS ${stamp_file})
|
DEPENDS ${stamp_file})
|
||||||
cmake_policy(POP)
|
cmake_policy(POP)
|
||||||
set_property(TARGET ${name}-${step} PROPERTY _EP_IS_EXTERNAL_PROJECT_STEP 1)
|
set_target_properties(${name}-${step} PROPERTIES
|
||||||
set_property(TARGET ${name}-${step} PROPERTY LABELS ${name})
|
_EP_IS_EXTERNAL_PROJECT_STEP 1
|
||||||
set_property(TARGET ${name}-${step} PROPERTY FOLDER "ExternalProjectTargets/${name}")
|
LABELS "${name}"
|
||||||
|
FOLDER "ExternalProjectTargets/${name}"
|
||||||
|
)
|
||||||
|
|
||||||
if(cmp0114 STREQUAL "NEW")
|
if(cmp0114 STREQUAL "NEW")
|
||||||
# Add target-level dependencies for the step.
|
# Add target-level dependencies for the step.
|
||||||
@@ -3164,7 +3165,7 @@ function(_ep_extract_configure_command var name)
|
|||||||
list(APPEND cmd "-G${CMAKE_GENERATOR}")
|
list(APPEND cmd "-G${CMAKE_GENERATOR}")
|
||||||
if("${CMAKE_GENERATOR}" MATCHES "Green Hills MULTI")
|
if("${CMAKE_GENERATOR}" MATCHES "Green Hills MULTI")
|
||||||
set(has_cmake_cache_default_args 1)
|
set(has_cmake_cache_default_args 1)
|
||||||
set(cmake_cache_default_args ${cmake_cache_default_args}
|
list(APPEND cmake_cache_default_args
|
||||||
"-DGHS_TARGET_PLATFORM:STRING=${GHS_TARGET_PLATFORM}"
|
"-DGHS_TARGET_PLATFORM:STRING=${GHS_TARGET_PLATFORM}"
|
||||||
"-DGHS_PRIMARY_TARGET:STRING=${GHS_PRIMARY_TARGET}"
|
"-DGHS_PRIMARY_TARGET:STRING=${GHS_PRIMARY_TARGET}"
|
||||||
"-DGHS_TOOLSET_ROOT:STRING=${GHS_TOOLSET_ROOT}"
|
"-DGHS_TOOLSET_ROOT:STRING=${GHS_TOOLSET_ROOT}"
|
||||||
@@ -3489,11 +3490,12 @@ function(ExternalProject_Add name)
|
|||||||
# argument was passed, we explicitly set it for the target.
|
# argument was passed, we explicitly set it for the target.
|
||||||
add_custom_target(${name} ALL DEPENDS ${complete_stamp_file})
|
add_custom_target(${name} ALL DEPENDS ${complete_stamp_file})
|
||||||
cmake_policy(POP)
|
cmake_policy(POP)
|
||||||
set_property(TARGET ${name} PROPERTY _EP_IS_EXTERNAL_PROJECT 1)
|
set_target_properties(${name} PROPERTIES
|
||||||
set_property(TARGET ${name} PROPERTY LABELS ${name})
|
_EP_IS_EXTERNAL_PROJECT 1
|
||||||
set_property(TARGET ${name} PROPERTY FOLDER "ExternalProjectTargets/${name}")
|
LABELS ${name}
|
||||||
|
FOLDER "ExternalProjectTargets/${name}"
|
||||||
set_property(TARGET ${name} PROPERTY _EP_CMP0114 "${cmp0114}")
|
_EP_CMP0114 "${cmp0114}"
|
||||||
|
)
|
||||||
|
|
||||||
set(keywords
|
set(keywords
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user