【发布时间】:2020-12-20 07:42:36
【问题描述】:
我正在尝试将我的项目升级到新的构建系统。我必须在 cmakelists.txt 文件中设置 -UseModernBuildSystem=YES。我怎样才能做到这一点?我的项目是使用终端构建的
【问题讨论】:
标签: xcode cmake terminal cmakelists-options xcode-new-build-system
我正在尝试将我的项目升级到新的构建系统。我必须在 cmakelists.txt 文件中设置 -UseModernBuildSystem=YES。我怎样才能做到这一点?我的项目是使用终端构建的
【问题讨论】:
标签: xcode cmake terminal cmakelists-options xcode-new-build-system
问题是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})
【讨论】: