Merge topic 'bundle-exe-space-in-name'

d3fd518c03 find_program: Properly decode URL for bundle exe name with spaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4891
This commit is contained in:
Brad King
2020-06-15 13:36:17 +00:00
committed by Kitware Robot
4 changed files with 19 additions and 7 deletions
@@ -0,0 +1 @@
-- FakeApp_EXECUTABLE='.*/Tests/RunCMake/find_program/BundleSpaceInName-build/Fake app.app/Contents/MacOS/Fake app'
@@ -0,0 +1,8 @@
set(fakeApp "${CMAKE_CURRENT_BINARY_DIR}/Fake app.app/Contents/MacOS/Fake app")
file(WRITE "${fakeApp}" "#!/bin/sh\n")
execute_process(COMMAND chmod a+rx "${fakeApp}")
find_program(FakeApp_EXECUTABLE NAMES "Fake app" NO_DEFAULT_PATH
PATHS "${CMAKE_CURRENT_BINARY_DIR}"
)
message(STATUS "FakeApp_EXECUTABLE='${FakeApp_EXECUTABLE}'")
@@ -20,3 +20,7 @@ else()
run_cmake(ExeNoRead)
endif()
endif()
if(APPLE)
run_cmake(BundleSpaceInName)
endif()