diff options
author | T.J. Corona <tj.corona@kitware.com> | 2020-07-28 00:56:26 (GMT) |
---|---|---|
committer | T.J. Corona <tj.corona@kitware.com> | 2020-07-28 14:35:51 (GMT) |
commit | 45ed314bfff5b9b59dcba8139ab1c695a81a05f3 (patch) | |
tree | f408fa48018de296212d76e469f16854dbd18d9e /Tests/RunCMake/BundleUtilities | |
parent | 7788494257e0a1a22468b5542f9d8c5cb8c3dfed (diff) | |
download | CMake-45ed314bfff5b9b59dcba8139ab1c695a81a05f3.zip CMake-45ed314bfff5b9b59dcba8139ab1c695a81a05f3.tar.gz CMake-45ed314bfff5b9b59dcba8139ab1c695a81a05f3.tar.bz2 |
BundleUtilities: do not run install_name_tool on scripts
Use the same approach as commit 08be74bfd7 (GetPrerequisites: Fix
handling of executable scripts, 2018-12-16, v3.14.0-rc1~206^2).
Diffstat (limited to 'Tests/RunCMake/BundleUtilities')
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" |