1

Am trying to upgrade my project to new build system. I have to set the -UseModernBuildSystem=YES in the cmakelists.txt file. How can I do that? My project is builded using the terminal

iOSDEV
  • 11
  • 2
  • Does this answer your question? [How can I use the legacy build system with Xcode 10's \`xcodebuild\`?](https://stackoverflow.com/questions/51205221/how-can-i-use-the-legacy-build-system-with-xcode-10s-xcodebuild) – Roman Podymov Sep 01 '20 at 08:36

1 Answers1

0

Problem is here

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

This should be configurable in CMake

Had to find a work-around and this worked for me

# 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})
sandroid
  • 175
  • 1
  • 8