mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
Merge topic 'cmake-e-rm'
2d0100fac7replace remove and remove_directory with rm in tests5239fc5c75cmake -E: Add rm with improved semantics over remove and remove_directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3949
This commit is contained in:
@@ -155,7 +155,7 @@ function(cmake_add_fortran_subdirectory subdir)
|
||||
# make the external project always run make with each build
|
||||
externalproject_add_step(${project_name}_build forcebuild
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
-E rm -f
|
||||
${CMAKE_CURRENT_BUILD_DIR}/${project_name}-prefix/src/${project_name}-stamp/${project_name}-build
|
||||
DEPENDEES configure
|
||||
DEPENDERS build
|
||||
|
||||
@@ -1120,7 +1120,7 @@ if(NOT \"${gitclone_infofile}\" IS_NEWER_THAN \"${gitclone_stampfile}\")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND \${CMAKE_COMMAND} -E remove_directory \"${source_dir}\"
|
||||
COMMAND \${CMAKE_COMMAND} -E rm -rf \"${source_dir}\"
|
||||
RESULT_VARIABLE error_code
|
||||
)
|
||||
if(error_code)
|
||||
@@ -1196,7 +1196,7 @@ if(NOT \"${hgclone_infofile}\" IS_NEWER_THAN \"${hgclone_stampfile}\")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND \${CMAKE_COMMAND} -E remove_directory \"${source_dir}\"
|
||||
COMMAND \${CMAKE_COMMAND} -E rm -rf \"${source_dir}\"
|
||||
RESULT_VARIABLE error_code
|
||||
)
|
||||
if(error_code)
|
||||
@@ -2580,7 +2580,7 @@ function(_ep_add_download_command name)
|
||||
if(IS_DIRECTORY "${url}")
|
||||
get_filename_component(abs_dir "${url}" ABSOLUTE)
|
||||
set(comment "Performing download step (DIR copy) for '${name}'")
|
||||
set(cmd ${CMAKE_COMMAND} -E remove_directory ${source_dir}
|
||||
set(cmd ${CMAKE_COMMAND} -E rm -rf ${source_dir}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${abs_dir} ${source_dir})
|
||||
else()
|
||||
get_property(no_extract TARGET "${name}" PROPERTY _EP_DOWNLOAD_NO_EXTRACT SET)
|
||||
|
||||
@@ -2006,7 +2006,7 @@ macro(CUDA_BUILD_CLEAN_TARGET)
|
||||
string(TOUPPER ${cuda_clean_target_name} cuda_clean_target_name)
|
||||
endif()
|
||||
add_custom_target(${cuda_clean_target_name}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${CUDA_ADDITIONAL_CLEAN_FILES})
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${CUDA_ADDITIONAL_CLEAN_FILES})
|
||||
|
||||
# Clear out the variable, so the next time we configure it will be empty.
|
||||
# This is useful so that the files won't persist in the list after targets
|
||||
|
||||
@@ -174,7 +174,7 @@ endmacro()
|
||||
# Delete the target file
|
||||
cuda_execute_process(
|
||||
"Removing ${generated_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E rm -f "${generated_file}"
|
||||
)
|
||||
|
||||
# For CUDA 2.3 and below, -G -M doesn't work, so remove the -G flag
|
||||
@@ -241,7 +241,7 @@ endif()
|
||||
# Delete the temporary file
|
||||
cuda_execute_process(
|
||||
"Removing ${cmake_dependency_file}.tmp and ${NVCC_generated_dependency_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${cmake_dependency_file}.tmp" "${NVCC_generated_dependency_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E rm -f "${cmake_dependency_file}.tmp" "${NVCC_generated_dependency_file}"
|
||||
)
|
||||
|
||||
if(CUDA_result)
|
||||
@@ -267,7 +267,7 @@ if(CUDA_result)
|
||||
# Since nvcc can sometimes leave half done files make sure that we delete the output file.
|
||||
cuda_execute_process(
|
||||
"Removing ${generated_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E rm -f "${generated_file}"
|
||||
)
|
||||
message(FATAL_ERROR "Error generating file ${generated_file}")
|
||||
else()
|
||||
|
||||
@@ -47,7 +47,7 @@ set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <OBJECTS> -o <TARGET> <C
|
||||
|
||||
# needs sdcc 2.7.0 + sddclib from cvs
|
||||
set(CMAKE_C_CREATE_STATIC_LIBRARY
|
||||
"\"${CMAKE_COMMAND}\" -E remove <TARGET>"
|
||||
"\"${CMAKE_COMMAND}\" -E rm -f <TARGET>"
|
||||
"<CMAKE_AR> -a <TARGET> <LINK_FLAGS> <OBJECTS> ")
|
||||
|
||||
# not supported by sdcc
|
||||
|
||||
@@ -124,7 +124,7 @@ macro(__windows_compiler_gnu lang)
|
||||
string(REPLACE "<OBJECTS>" "-Wl,--whole-archive <OBJECT_DIR>/objects.a -Wl,--no-whole-archive"
|
||||
CMAKE_${lang}_${rule} "${CMAKE_${lang}_${rule}}")
|
||||
set(CMAKE_${lang}_${rule}
|
||||
"<CMAKE_COMMAND> -E remove -f <OBJECT_DIR>/objects.a"
|
||||
"<CMAKE_COMMAND> -E rm -f <OBJECT_DIR>/objects.a"
|
||||
"<CMAKE_AR> cr <OBJECT_DIR>/objects.a <OBJECTS>"
|
||||
"${CMAKE_${lang}_${rule}}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user