【问题标题】:How to set newbuild system of xcode in cmake?如何在cmake中设置xcode的newbuild系统?
【发布时间】:2020-12-20 07:42:36
【问题描述】:

我正在尝试将我的项目升级到新的构建系统。我必须在 cmakelists.txt 文件中设置 -UseModernBuildSystem=YES。我怎样才能做到这一点?我的项目是使用终端构建的

【问题讨论】:

标签: xcode cmake terminal cmakelists-options xcode-new-build-system


【解决方案1】:

问题是here

  if (this->XcodeVersion >= 100) {
    xout.Element("key", "BuildSystemType");
    xout.Element("string", "Original");
    xout.Element("key", "DisableBuildSystemDeprecationWarning");
    xout.Element("true");
  }

这应该可以在 CMake 中配置

必须找到解决方法,这对我有用

# use the new build system
set(WORKSPACE_FILE project.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings)
message("Deleting workspace file: ${WORKSPACE_FILE}")
execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${WORKSPACE_FILE}
                INPUT_FILE ${WORKSPACE_FILE})

【讨论】:

    猜你喜欢
    • 2011-09-13
    • 1970-01-01
    • 2013-01-20
    • 2012-09-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-14
    • 1970-01-01
    • 2011-11-03
    相关资源
    最近更新 更多