diff options
author | Brad King <brad.king@kitware.com> | 2020-07-29 12:12:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-29 12:12:25 (GMT) |
commit | 37e27aa552c89f56a3b7c1bee048d8693da36cee (patch) | |
tree | a995721784510051fdd4b64ffe413624f303a16d /Tests/RunCMake | |
parent | b7522e48a419354df2cfae92111e49307ea1faa3 (diff) | |
parent | 45ed314bfff5b9b59dcba8139ab1c695a81a05f3 (diff) | |
download | CMake-37e27aa552c89f56a3b7c1bee048d8693da36cee.zip CMake-37e27aa552c89f56a3b7c1bee048d8693da36cee.tar.gz CMake-37e27aa552c89f56a3b7c1bee048d8693da36cee.tar.bz2 |
Merge topic 'fixup_bundle_item-fix'
45ed314bff BundleUtilities: do not run install_name_tool on scripts
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5071
Diffstat (limited to 'Tests/RunCMake')
5 files changed, 28 insertions, 0 deletions
diff --git a/Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake b/Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake new file mode 100644 index 0000000..78a9b66 --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake @@ -0,0 +1,18 @@ +include(BundleUtilities) + +set(BU_CHMOD_BUNDLE_ITEMS ON) + +function(check_script script) + fixup_bundle_item(${script} ${script} "" "") +endfunction() + +# Should not throw any errors +# Shell script +set(script_sh_EMBEDDED_ITEM ${CMAKE_CURRENT_LIST_DIR}/test.app/script.sh) +check_script(${CMAKE_CURRENT_LIST_DIR}/test.app/script.sh) +# Batch script +set(script_bat_EMBEDDED_ITEM ${CMAKE_CURRENT_LIST_DIR}/test.app/script.bat) +check_script(${CMAKE_CURRENT_LIST_DIR}/test.app/script.bat) +# Shell script without extension +set(script_EMBEDDED_ITEM ${CMAKE_CURRENT_LIST_DIR}/test.app/script) +check_script(${CMAKE_CURRENT_LIST_DIR}/test.app/script) diff --git a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake index 14aaff1..df28102 100644 --- a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake +++ b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake @@ -9,3 +9,4 @@ run_cmake(CMP0080-WARN) run_cmake_command(CMP0080-COMMAND-OLD ${CMAKE_COMMAND} -DCMP0080_VALUE:STRING=OLD -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake) run_cmake_command(CMP0080-COMMAND-NEW ${CMAKE_COMMAND} -DCMP0080_VALUE:STRING=NEW -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake) run_cmake_command(CMP0080-COMMAND-WARN ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake) +run_cmake_command(ExecutableScripts ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/ExecutableScripts.cmake) diff --git a/Tests/RunCMake/BundleUtilities/test.app/script b/Tests/RunCMake/BundleUtilities/test.app/script new file mode 100755 index 0000000..23bf47c --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/test.app/script @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "Hello World" diff --git a/Tests/RunCMake/BundleUtilities/test.app/script.bat b/Tests/RunCMake/BundleUtilities/test.app/script.bat new file mode 100755 index 0000000..dbb0ec2 --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/test.app/script.bat @@ -0,0 +1,3 @@ +@echo off + +echo "Hello world" diff --git a/Tests/RunCMake/BundleUtilities/test.app/script.sh b/Tests/RunCMake/BundleUtilities/test.app/script.sh new file mode 100755 index 0000000..23bf47c --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/test.app/script.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "Hello World" |