Visual Studio / Xcode behavior difference for add_custom_target
Upon searching for how to make a "run" target, I came across this answer: https://stackoverflow.com/questions/9350529/cmake-make-run
add_custom_target(run COMMAND binary DEPENDS binary WORKING_DIRECTORY ${CMAKE_PROJECT_DIR} )
For Visual Studio 2017, this will generate a project that has the COMMAND in the project's Property Pages -> Debugging -> Command box. For Xcode Beta 10, this will generate a "run -> My Mac" target where if you edit the schema, the "Run" section has "Executable" set to "None". These two are not the same. XCode runs COMMAND as part of the build phase while VS runs the command and launches the debugger for the COMMAND.
While I was trying to achieve the Visual Studio result for Xcode, my reading of the add_custom_target leads me to believe that CMake should have put COMMAND into the Property Pages -> Custom Build Tool -> Command box.