Xcode how to exclude FOLDERS from compilation?

前端 未结 4 1766
走了就别回头了
走了就别回头了 2021-02-19 11:30

I saw this and answers in stackO, but didn\'t find how to exclude folders.

I have 3 folders with a lot of .h , .m and .mm and i need to exclude them temporary, but not

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-19 12:27

    This answer covers only how to exclude the files from the build or the matching file patterns.Exclude from the path or the folder has currently not been implemented in the Xcode

    • Select the editor
    • Select Add Build Setting
    • In Add Build Setting select Add User Defined Settings for this select the project for which you want to add the user defined settings.
    • Select the name of it as EXCLUDED_SOURCE_FILE_NAMES
    • Set the value as filename patterns,the files you want to exclude.

    or

    You can use the File Inspector and in the target membership simply uncheck the file which you do not want to include in your build

    Similarly the same thing can be done compile sources category where you can select the file which you want to add to your build.

提交回复
热议问题