XCode generator does not generate a proper xcode project when .swift files are in the project.
This is on XCode 8.2, using CMake 3.8.1 and the XCode generator.
If a .swift file is included in the CMakeLists project, it is not included as part of the PBXSourcesBuildPhase. For example, I have two .swift files, AppDelegate.swift and ViewDelegate.swift. This is the PbxSourcesBuildPhase generated by cmake (edited to remove anything proprietary):
3EF8DE5AF7E6448FBE1C4A89 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2FF6DFE4F36F4C36A4FBBA91 /* Cardreader.mm */,
E53F580BD73F46C58233D5D4 /* main.mm */,
);
runOnlyForDeploymentPostprocessing = 0;
};
After I manualy add the files to the target:
3EF8DE5AF7E6448FBE1C4A89 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3B71D98C1ECE9683007AA9DA /* ViewController.swift in Sources */,
3B71D98B1ECE967F007AA9DA /* AppDelegate.swift in Sources */,
2FF6DFE4F36F4C36A4FBBA91 /* Cardreader.mm in Sources */,
E53F580BD73F46C58233D5D4 /* main.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};