Xcode: Option to use Xcode default artifact locations
Recently, my Xcode project build by CMake started outputting the built library to the wrong directory. I determined this was because CMake is now setting the "CONFIGURATION_BUILD_DIR" property on the target. To get this to work how I need it to, the property can't be set to any value – it can't override the default value. If the property is set to anything, Xcode won't use its own value for the build directory.
This brings me to a wider point about CMake Xcode projects – there is no way to unset a default value that CMake uses, either on a target or globally in the project. You can't unset the target property, CMake uses its default value. You can't set the property to an empty string, as the property is then set to an empty string in the Xcode project. This makes it impossible to achieve certain things with CMake Xcode projects. Unless I've missed a way it can be done?
Perhaps a certain string could be used in Xcode attribute properties to instruct CMake not to set a value for the property, e.g. "<XCODE_DEFAULT_VALUE>"? Or perhaps CMake should set its default values to the Xcode attribute variables/properties before CMakeLists is run, and after running CMakeLists, only the variables/properties that are still set are output to the generated project. In this way the existing mechanisms for unsetting variables/properties could be used.