diff options
author | Brad King <brad.king@kitware.com> | 2021-03-29 13:31:31 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-03-29 13:32:09 (GMT) |
commit | d212d91f14d2f2ed4f77ea7f190bbea2a4f6e302 (patch) | |
tree | 2d9709bb02f3a65a2155110210c3321f80fe31b6 /Tests | |
parent | 99dd2a6e159cc72cd76809d22abd13d07c99e849 (diff) | |
parent | 769ff05483fa92e63466839854c4f3f0142a4fb3 (diff) | |
download | CMake-d212d91f14d2f2ed4f77ea7f190bbea2a4f6e302.zip CMake-d212d91f14d2f2ed4f77ea7f190bbea2a4f6e302.tar.gz CMake-d212d91f14d2f2ed4f77ea7f190bbea2a4f6e302.tar.bz2 |
Merge topic 'commands-file-permissions' into release-3.20
769ff05483 Help: Clarify permission-related command options
900184616a Cleanup: Fix misspelt name of local C++ variable
635431a0c9 Tests: Check host platform instead of target for running stat
4ceb0ca59e Tests: Remove redundant files for configure_file() tests
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5945
Diffstat (limited to 'Tests')
5 files changed, 7 insertions, 7 deletions
diff --git a/Tests/RunCMake/File_Generate/UseSourcePermissionsVerify.cmake b/Tests/RunCMake/File_Generate/UseSourcePermissionsVerify.cmake index 8b30f96..31494d5 100644 --- a/Tests/RunCMake/File_Generate/UseSourcePermissionsVerify.cmake +++ b/Tests/RunCMake/File_Generate/UseSourcePermissionsVerify.cmake @@ -2,7 +2,7 @@ if(NOT EXISTS "${generatedFile}") message(SEND_ERROR "Missing generated file:\n ${generatedFile}") endif() -if (UNIX) +if (CMAKE_HOST_UNIX) find_program(STAT_EXECUTABLE NAMES stat) if(NOT STAT_EXECUTABLE) return() diff --git a/Tests/RunCMake/configure_file/SourcePermissions-result.txt b/Tests/RunCMake/configure_file/SourcePermissions-result.txt deleted file mode 100644 index e69de29..0000000 --- a/Tests/RunCMake/configure_file/SourcePermissions-result.txt +++ /dev/null diff --git a/Tests/RunCMake/configure_file/SourcePermissions-stderr.txt b/Tests/RunCMake/configure_file/SourcePermissions-stderr.txt deleted file mode 100644 index e69de29..0000000 --- a/Tests/RunCMake/configure_file/SourcePermissions-stderr.txt +++ /dev/null diff --git a/Tests/RunCMake/configure_file/SourcePermissions.cmake b/Tests/RunCMake/configure_file/SourcePermissions.cmake index 50330fc..c4d3d61 100644 --- a/Tests/RunCMake/configure_file/SourcePermissions.cmake +++ b/Tests/RunCMake/configure_file/SourcePermissions.cmake @@ -6,17 +6,17 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sourcefile.txt WORLD_READ ) -if (UNIX) +if (CMAKE_HOST_UNIX) find_program(STAT_EXECUTABLE NAMES stat) if(NOT STAT_EXECUTABLE) return() endif() - if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + if (CMAKE_HOST_SYSTEM_NAME MATCHES "FreeBSD") execute_process(COMMAND "${STAT_EXECUTABLE}" -f %Lp "${CMAKE_CURRENT_BINARY_DIR}/sourcefile-source-permissions.txt" OUTPUT_VARIABLE output ) - elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") + elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin") execute_process(COMMAND "${STAT_EXECUTABLE}" -f %A "${CMAKE_CURRENT_BINARY_DIR}/sourcefile-source-permissions.txt" OUTPUT_VARIABLE output ) diff --git a/Tests/RunCMake/configure_file/UseSourcePermissions.cmake b/Tests/RunCMake/configure_file/UseSourcePermissions.cmake index f7aedd1..65e5954 100644 --- a/Tests/RunCMake/configure_file/UseSourcePermissions.cmake +++ b/Tests/RunCMake/configure_file/UseSourcePermissions.cmake @@ -3,20 +3,20 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sourcefile.txt USE_SOURCE_PERMISSIONS ) -if (UNIX) +if (CMAKE_HOST_UNIX) find_program(STAT_EXECUTABLE NAMES stat) if(NOT STAT_EXECUTABLE) return() endif() - if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + if (CMAKE_HOST_SYSTEM_NAME MATCHES "FreeBSD") execute_process(COMMAND "${STAT_EXECUTABLE}" -f %Lp "${CMAKE_CURRENT_SOURCE_DIR}/sourcefile.txt" OUTPUT_VARIABLE output1 ) execute_process(COMMAND "${STAT_EXECUTABLE}" -f %Lp "${CMAKE_CURRENT_BINARY_DIR}/sourcefile-use-source-permissions.txt" OUTPUT_VARIABLE output2 ) - elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin") + elseif (CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin") execute_process(COMMAND "${STAT_EXECUTABLE}" -f %A "${CMAKE_CURRENT_SOURCE_DIR}/sourcefile.txt" OUTPUT_VARIABLE output1 ) |