Generate Xcode scheme files during configuration.

Every time CMake is re-run, Xcode shows a popup asking if
user wants to manage schemes automatically or manually.
Building Blender wiki page recommends managing schemes automatically.

This change sets the default behavior to "automatically" and generates
the .xcscheme files while CMake is running, instead of hogging Xcode
later on. With tests enabled, the number of schemes is 203.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8820
This commit is contained in:
Ankit 2020-09-08 00:24:59 +05:30 committed by Ankit Meel
parent 6aaa6c96a1
commit 5eb5978043
1 changed files with 8 additions and 0 deletions

View File

@ -154,3 +154,11 @@ if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
add_definitions("-DMACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif()
if(${CMAKE_GENERATOR} MATCHES "Xcode")
# Generate schemes in Blender.xcodeproj/xcshareddata/xcschemes/ early, at
# configuration time, not when Xcode is opened.
# This gets rid of "Manage schemes automatically" confirmation dialog that
# appears whenever CMake is run.
set(CMAKE_XCODE_GENERATE_SCHEME ON)
endif()