[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4413-g7d0d4a4
Brad King
brad.king at kitware.com
Wed Oct 2 14:01:09 EDT 2013
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 7d0d4a4b5c8a927372801dcd1d372bfd013fa13f (commit)
via a3194ff4a70c60db4fcf7d0d9bee2139af67ec8f (commit)
via dff8d113b4e7009436072af1b458272492badee6 (commit)
via 118032247cf3c4938b4edce1c9c105b21b436518 (commit)
via 765b46d1e1c6bc397942764fcbdd9fab9d29cb11 (commit)
via c0133a58e85f763299e3f91702f988ab9c915b8a (commit)
from 0019a5018a6eaea919f66d1f39e0312f9da5c1ea (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=7d0d4a4b5c8a927372801dcd1d372bfd013fa13f
commit 7d0d4a4b5c8a927372801dcd1d372bfd013fa13f
Merge: 0019a50 a3194ff
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 2 14:01:05 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 2 14:01:05 2013 -0400
Merge topic 'xcode-5' into next
a3194ff Xcode: Fix OBJECT library support for Xcode 5 (#14254)
dff8d11 Xcode: Drop XCODE_DEPEND_HELPER for Xcode >= 5
1180322 Xcode: Teach Tests/BuildDepends to allow LINK_DEPENDS_NO_SHARED failure
765b46d Xcode: Fix test architecture selection for Xcode >= 5
c0133a5 CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3194ff4a70c60db4fcf7d0d9bee2139af67ec8f
commit a3194ff4a70c60db4fcf7d0d9bee2139af67ec8f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 2 11:52:18 2013 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 2 13:03:21 2013 -0400
Xcode: Fix OBJECT library support for Xcode 5 (#14254)
Xcode 2.1 through 4 supported $(CURRENT_ARCH) in a PBXFileReference
'path' value used in the "Link Binary with Libraries" build phase.
CMake uses this to reference object file locations on link lines to
bring in OBJECT library content. However, Xcode 5 now evaluates the
$(CURRENT_ARCH) reference in this context as "undefined_arch" so the
wrong path is given to the linker. There seems to be no alternative way
to produce an architecture-specific value in a PBXFileReference.
Fortunately Xcode 5 now also handles link dependencies for paths linked
through OTHER_LDFLAGS. For Xcode >= 5, move the OBJECT library object
file references from the link build phase to OTHER_LDFLAGS. We can
still show the object files in the source group listing in either case.
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 002c219..0a2b32b 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1031,18 +1031,21 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
}
}
- // Add object library contents as external objects. (Equivalent to
- // the externalObjFiles above, except each one is not a cmSourceFile
- // within the target.)
- std::vector<std::string> objs;
- this->GetGeneratorTarget(&cmtarget)->UseObjectLibraries(objs);
- for(std::vector<std::string>::const_iterator
- oi = objs.begin(); oi != objs.end(); ++oi)
- {
- std::string obj = *oi;
- cmXCodeObject* xsf =
- this->CreateXCodeSourceFileFromPath(obj, cmtarget, "");
- externalObjFiles.push_back(xsf);
+ if(this->XcodeVersion < 50)
+ {
+ // Add object library contents as external objects. (Equivalent to
+ // the externalObjFiles above, except each one is not a cmSourceFile
+ // within the target.)
+ std::vector<std::string> objs;
+ this->GetGeneratorTarget(&cmtarget)->UseObjectLibraries(objs);
+ for(std::vector<std::string>::const_iterator
+ oi = objs.begin(); oi != objs.end(); ++oi)
+ {
+ std::string obj = *oi;
+ cmXCodeObject* xsf =
+ this->CreateXCodeSourceFileFromPath(obj, cmtarget, "");
+ externalObjFiles.push_back(xsf);
+ }
}
// some build phases only apply to bundles and/or frameworks
@@ -2769,13 +2772,6 @@ void cmGlobalXCodeGenerator
}
}
- // Skip link information for static libraries.
- if(cmtarget->GetType() == cmTarget::OBJECT_LIBRARY ||
- cmtarget->GetType() == cmTarget::STATIC_LIBRARY)
- {
- return;
- }
-
// Loop over configuration types and set per-configuration info.
for(std::vector<std::string>::iterator i =
this->CurrentConfigurationTypes.begin();
@@ -2788,6 +2784,31 @@ void cmGlobalXCodeGenerator
configName = 0;
}
+ if(this->XcodeVersion >= 50)
+ {
+ // Add object library contents as link flags.
+ std::string linkObjs;
+ const char* sep = "";
+ std::vector<std::string> objs;
+ this->GetGeneratorTarget(cmtarget)->UseObjectLibraries(objs);
+ for(std::vector<std::string>::const_iterator
+ oi = objs.begin(); oi != objs.end(); ++oi)
+ {
+ linkObjs += sep;
+ sep = " ";
+ linkObjs += this->XCodeEscapePath(oi->c_str());
+ }
+ this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS",
+ linkObjs.c_str(), configName);
+ }
+
+ // Skip link information for object libraries.
+ if(cmtarget->GetType() == cmTarget::OBJECT_LIBRARY ||
+ cmtarget->GetType() == cmTarget::STATIC_LIBRARY)
+ {
+ continue;
+ }
+
// Compute the link library and directory information.
cmComputeLinkInformation* pcli = cmtarget->GetLinkInformation(configName);
if(!pcli)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dff8d113b4e7009436072af1b458272492badee6
commit dff8d113b4e7009436072af1b458272492badee6
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 2 11:39:22 2013 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 2 12:49:09 2013 -0400
Xcode: Drop XCODE_DEPEND_HELPER for Xcode >= 5
Xcode 5.0 now computes dependencies from files linked through
OTHER_LDFLAGS, so we no longer need the XCODE_DEPEND_HELPER hack to
re-link dependents when targets change.
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 7cb2d1f..002c219 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -431,13 +431,16 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
// Add XCODE depend helper
std::string dir = mf->GetCurrentOutputDirectory();
- cmCustomCommandLine makecommand;
- makecommand.push_back("make");
- makecommand.push_back("-C");
- makecommand.push_back(dir.c_str());
- makecommand.push_back("-f");
- makecommand.push_back(this->CurrentXCodeHackMakefile.c_str());
- makecommand.push_back(""); // placeholder, see below
+ cmCustomCommandLine makeHelper;
+ if(this->XcodeVersion < 50)
+ {
+ makeHelper.push_back("make");
+ makeHelper.push_back("-C");
+ makeHelper.push_back(dir.c_str());
+ makeHelper.push_back("-f");
+ makeHelper.push_back(this->CurrentXCodeHackMakefile.c_str());
+ makeHelper.push_back(""); // placeholder, see below
+ }
// Add ZERO_CHECK
bool regenerate = !mf->IsOn("CMAKE_SUPPRESS_REGENERATION");
@@ -477,17 +480,18 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
// run the depend check makefile as a post build rule
// this will make sure that when the next target is built
// things are up-to-date
- if((target.GetType() == cmTarget::EXECUTABLE ||
+ if(!makeHelper.empty() &&
+ (target.GetType() == cmTarget::EXECUTABLE ||
// Nope - no post-build for OBJECT_LIRBRARY
// target.GetType() == cmTarget::OBJECT_LIBRARY ||
target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY))
{
- makecommand[makecommand.size()-1] =
+ makeHelper[makeHelper.size()-1] = // fill placeholder
this->PostBuildMakeTarget(target.GetName(), "$(CONFIGURATION)");
cmCustomCommandLines commandLines;
- commandLines.push_back(makecommand);
+ commandLines.push_back(makeHelper);
lg->GetMakefile()->AddCustomCommandToTarget(target.GetName(),
no_depends,
commandLines,
@@ -3338,8 +3342,11 @@ void cmGlobalXCodeGenerator
cmXCodeObject* t = *i;
this->AddDependAndLinkInformation(t);
}
- // now create xcode depend hack makefile
- this->CreateXCodeDependHackTarget(targets);
+ if(this->XcodeVersion < 50)
+ {
+ // now create xcode depend hack makefile
+ this->CreateXCodeDependHackTarget(targets);
+ }
// now add all targets to the root object
cmXCodeObject* allTargets = this->CreateObject(cmXCodeObject::OBJECT_LIST);
for(std::vector<cmXCodeObject*>::iterator i = targets.begin();
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=118032247cf3c4938b4edce1c9c105b21b436518
commit 118032247cf3c4938b4edce1c9c105b21b436518
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 2 11:34:21 2013 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 2 12:49:09 2013 -0400
Xcode: Teach Tests/BuildDepends to allow LINK_DEPENDS_NO_SHARED failure
Xcode 5.0 now relinks targets when their shared libraries dependencies
are modified, and there seems to be no way to stop it. Report this as a
known limitation in the test output and do not fail.
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt
index 3af0fda..0687154 100644
--- a/Tests/BuildDepends/CMakeLists.txt
+++ b/Tests/BuildDepends/CMakeLists.txt
@@ -285,6 +285,8 @@ if(EXISTS "${link_depends_no_shared_check_txt}")
file(STRINGS "${link_depends_no_shared_check_txt}" link_depends_no_shared_check LIMIT_COUNT 1)
if("${link_depends_no_shared_check}" STREQUAL "0")
message(STATUS "link_depends_no_shared_exe is older than link_depends_no_shared_lib as expected.")
+ elseif(XCODE AND NOT XCODE_VERSION VERSION_LESS 5)
+ message(STATUS "Known limitation: link_depends_no_shared_exe is newer than link_depends_no_shared_lib but we cannot stop Xcode ${XCODE_VERSION} from enforcing this dependency.")
else()
message(SEND_ERROR "Project did not rebuild properly: link_depends_no_shared_exe is newer than link_depends_no_shared_lib.")
endif()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=765b46d1e1c6bc397942764fcbdd9fab9d29cb11
commit 765b46d1e1c6bc397942764fcbdd9fab9d29cb11
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 2 10:44:25 2013 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 2 12:48:20 2013 -0400
Xcode: Fix test architecture selection for Xcode >= 5
In Tests/Architecture and Tests/BuildDepends/Project we select a set of
OS X cpu architectures to use for the test. Prior to Xcode 4 we always
used i386 and ppc. Starting with Xcode 4, the tools do not support ppc
but do support x86_64, so we switch to that. Fix the version check to
recognize Xcode >= 5 as at least Xcode 4 and use the new architectures.
diff --git a/Tests/Architecture/CMakeLists.txt b/Tests/Architecture/CMakeLists.txt
index 927ce3f..ea5fc0b 100644
--- a/Tests/Architecture/CMakeLists.txt
+++ b/Tests/Architecture/CMakeLists.txt
@@ -7,8 +7,8 @@ function(test_for_xcode4 result_var)
execute_process(COMMAND xcodebuild -version
OUTPUT_VARIABLE ov RESULT_VARIABLE rv
)
- if("${rv}" STREQUAL "0")
- if(ov MATCHES "^Xcode 4.[0-9].*$")
+ if("${rv}" STREQUAL "0" AND ov MATCHES "^Xcode ([0-9]+)\\.")
+ if(NOT CMAKE_MATCH_1 VERSION_LESS 4)
set(${result_var} 1 PARENT_SCOPE)
endif()
endif()
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index b4c6a07..8806ecd 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -7,8 +7,8 @@ function(test_for_xcode4 result_var)
execute_process(COMMAND xcodebuild -version
OUTPUT_VARIABLE ov RESULT_VARIABLE rv
)
- if("${rv}" STREQUAL "0")
- if(ov MATCHES "^Xcode 4.[0-9].*$")
+ if("${rv}" STREQUAL "0" AND ov MATCHES "^Xcode ([0-9]+)\\.")
+ if(NOT CMAKE_MATCH_1 VERSION_LESS 4)
set(${result_var} 1 PARENT_SCOPE)
endif()
endif()
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/cmGlobalXCodeGenerator.cxx | 88 +++++++++++++++++++----------
Tests/Architecture/CMakeLists.txt | 4 +-
Tests/BuildDepends/CMakeLists.txt | 2 +
Tests/BuildDepends/Project/CMakeLists.txt | 4 +-
5 files changed, 65 insertions(+), 35 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list