Run Script support for Xcode (execute only off dependency analysis)
Can cmake add support for setting up Run Script rules, or is this there someway to set this directly into the generated Xcode project?
We are using a "p4 edit appname" command in an Xcode "Run Script" with "based on dependency analysis" checked. This makes sure the checkout only executes that if the app changes/rebuilds.
I setup a cmake project with the following, but this isn't quite the same, since it executes every time. This means the files are always checked out, even if the build didn't change. git would detect the file is unchanged, but p4 would have the file checked out. This appears to only go into the Makefile that cmake generates.
add_custom_command(TARGET appname PRE_BUILD
COMMENT "Perforce Checkout App"
COMMAND p4 edit "${PROJECT_BINARY_DIR}/${APPNAME}"
)