Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions perftests/Xcode/PerfTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,16 @@ target_link_libraries(XcodePerfTests PRIVATE
# Run a custom command to fixup CMake's broken bundle CFBundleExecutable.
#
# http://www.cmake.org/Bug/view.php?id=15485
#
# It seems this is no longer an issue in Xcode 11.4/CMake 3.16.3, but leaving this
# workaround in place for good measure
get_target_property(xcode_perf_tests_output_directory XcodePerfTests LIBRARY_OUTPUT_DIRECTORY)
add_custom_command(
COMMAND defaults write ${CMAKE_CURRENT_BINARY_DIR}/XcodePerfTests.xctest/Contents/Info.plist CFBundleExecutable XcodePerfTests && touch ${CMAKE_CURRENT_BINARY_DIR}/fixup-has-run
COMMAND plutil -replace CFBundleExecutable -string XcodePerfTests ${xcode_perf_tests_output_directory}/XcodePerfTests.xctest/Contents/Info.plist && touch ${CMAKE_CURRENT_BINARY_DIR}/fixup-has-run
COMMENT "Fixing up XcodePerfTests.xctest CFBundleExecutable..."
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/XcodePerfTests.xctest/Contents/Info.plist)
OUTPUT ${xcode_perf_tests_output_directory}/XcodePerfTests.xctest/Contents/Info.plist)
add_custom_target(fixup-XcodePerfTests-bundle
ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/XcodePerfTests.xctest/Contents/Info.plist)

DEPENDS ${xcode_perf_tests_output_directory}/XcodePerfTests.xctest/Contents/Info.plist)
# Declare this dependency explicitly to avoid plutil failing because Info.plist is missing
add_dependencies(fixup-XcodePerfTests-bundle XcodePerfTests)