From cf13e495447662624c3389dc075fe48342f5e593 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Fri, 24 Feb 2017 16:18:35 +0100 Subject: Xcode: Control schema generation via variable Issue: #15441 --- Help/manual/cmake-properties.7.rst | 1 - Help/manual/cmake-variables.7.rst | 1 + Help/prop_gbl/XCODE_GENERATE_SCHEME.rst | 11 ----------- Help/release/dev/cmake-xcode-schemes.rst | 2 +- Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst | 11 +++++++++++ Source/cmGlobalXCodeGenerator.cxx | 3 +-- 6 files changed, 14 insertions(+), 15 deletions(-) delete mode 100644 Help/prop_gbl/XCODE_GENERATE_SCHEME.rst create mode 100644 Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 2157ba5..e07150a 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -46,7 +46,6 @@ Properties of Global Scope /prop_gbl/TARGET_SUPPORTS_SHARED_LIBS /prop_gbl/USE_FOLDERS /prop_gbl/XCODE_EMIT_EFFECTIVE_PLATFORM_NAME - /prop_gbl/XCODE_GENERATE_SCHEME .. _`Directory Properties`: diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 2606ba0..04d9cbd 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -86,6 +86,7 @@ Variables that Provide Information /variable/CMAKE_VS_PLATFORM_TOOLSET /variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE /variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION + /variable/CMAKE_XCODE_GENERATE_SCHEME /variable/CMAKE_XCODE_PLATFORM_TOOLSET /variable/PROJECT-NAME_BINARY_DIR /variable/PROJECT-NAME_SOURCE_DIR diff --git a/Help/prop_gbl/XCODE_GENERATE_SCHEME.rst b/Help/prop_gbl/XCODE_GENERATE_SCHEME.rst deleted file mode 100644 index be8b5b0..0000000 --- a/Help/prop_gbl/XCODE_GENERATE_SCHEME.rst +++ /dev/null @@ -1,11 +0,0 @@ -XCODE_GENERATE_SCHEME ---------------------- - -If enabled, the Xcode generator will generate schema files. Those are -are useful to invoke analyze, archive, build-for-testing and test -actions from the command line. - -.. note:: - - The Xcode Schema Generator is still experimental and subject to - change. diff --git a/Help/release/dev/cmake-xcode-schemes.rst b/Help/release/dev/cmake-xcode-schemes.rst index 27c19d7..81068ae 100644 --- a/Help/release/dev/cmake-xcode-schemes.rst +++ b/Help/release/dev/cmake-xcode-schemes.rst @@ -3,4 +3,4 @@ cmake-xcode-schemes * The :generator:`Xcode` generator got the ability to create schema files. This is still an experimental feature and can be activated by setting the - :prop_gbl:`XCODE_GENERATE_SCHEME` global property to a ``TRUE`` value. + :variable:`CMAKE_XCODE_GENERATE_SCHEME` variable to a ``TRUE`` value. diff --git a/Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst b/Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst new file mode 100644 index 0000000..c9fcc92 --- /dev/null +++ b/Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst @@ -0,0 +1,11 @@ +CMAKE_XCODE_GENERATE_SCHEME +--------------------------- + +If enabled, the Xcode generator will generate schema files. Those are +are useful to invoke analyze, archive, build-for-testing and test +actions from the command line. + +.. note:: + + The Xcode Schema Generator is still experimental and subject to + change. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b023d5c..77f3408 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3341,8 +3341,7 @@ void cmGlobalXCodeGenerator::OutputXCodeProject( // Since the lowest available Xcode version for testing was 7.0, // I'm setting this as a limit then - if (this->GetCMakeInstance()->GetState()->GetGlobalPropertyAsBool( - "XCODE_GENERATE_SCHEME") && + if (root->GetMakefile()->IsOn("CMAKE_XCODE_GENERATE_SCHEME") && this->XcodeVersion >= 70) { this->OutputXCodeSharedSchemes(xcodeDir); this->OutputXCodeWorkspaceSettings(xcodeDir); -- cgit v0.12