[Cmake-commits] CMake branch, next, updated. v2.8.9-3047-g50356b3
Brad King
brad.king at kitware.com
Fri Aug 10 13:02:25 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 50356b31f5799f9bfd85f97e305682a71de9ce2d (commit)
via e88bae77c3388a5b474b081e572004f02772d162 (commit)
from 0c3cbc5715348833b46ed40bbad6c880811ed764 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=50356b31f5799f9bfd85f97e305682a71de9ce2d
commit 50356b31f5799f9bfd85f97e305682a71de9ce2d
Merge: 0c3cbc5 e88bae7
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Aug 10 13:02:21 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Aug 10 13:02:21 2012 -0400
Merge topic 'xcode-select' into next
e88bae7 Xcode: Run xcode-select to find Xcode version file (#13463)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e88bae77c3388a5b474b081e572004f02772d162
commit e88bae77c3388a5b474b081e572004f02772d162
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Aug 10 11:58:47 2012 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Aug 10 12:58:22 2012 -0400
Xcode: Run xcode-select to find Xcode version file (#13463)
Multiple versions of Xcode may be installed in different locations.
Run "xcode-select --print-path" to detect the active Xcode location
and parse its Contents/version.plist file. Note that the Xcode.app
directory name may vary in developer versions.
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 938977b..cbf4bea 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -136,8 +136,23 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::New()
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
cmXcodeVersionParser parser;
- if (cmSystemTools::FileExists(
- "/Applications/Xcode.app/Contents/version.plist"))
+ std::string versionFile;
+ {
+ std::string out;
+ std::string::size_type pos;
+ if(cmSystemTools::RunSingleCommand("xcode-select --print-path", &out, 0, 0,
+ cmSystemTools::OUTPUT_NONE) &&
+ (pos = out.find(".app/"), pos != out.npos))
+ {
+ versionFile = out.substr(0, pos+5)+"Contents/version.plist";
+ }
+ }
+ if(!versionFile.empty() && cmSystemTools::FileExists(versionFile.c_str()))
+ {
+ parser.ParseFile(versionFile.c_str());
+ }
+ else if (cmSystemTools::FileExists(
+ "/Applications/Xcode.app/Contents/version.plist"))
{
parser.ParseFile
("/Applications/Xcode.app/Contents/version.plist");
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalXCodeGenerator.cxx | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list