[cmake-developers] [CMake] Xcode and Cmake ReRun

David Cole david.cole at kitware.com
Thu Jul 28 09:47:13 EDT 2011


After applying a small tweak on top of your patch, we have a dashboard
result the same as before your patch (with only one failing test):

  http://cdash.org/CDash/buildSummary.php?buildid=1374108

The tweak needed was this:

$ git show
commit 027b5f14efdb841e4917275f379ec5bb712fde4c
Author: David Cole <david.cole at kitware.com>
Date:   Thu Jul 28 08:45:18 2011 -0400

    WIP: Work even with spaces in the file name

diff --git a/Source/cmGlobalXCodeGenerator.cxx
b/Source/cmGlobalXCodeGenerator.cxx
index 8afca5c..7104970 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -368,9 +368,11 @@
cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,

   // Add Re-Run CMake rules
   this->CreateReRunCMakeFile(root, gens);
+  std::string file =
this->ConvertToRelativeForMake(this->CurrentReRunCMakeMakefile.c_str());
+  cmSystemTools::ReplaceString(file, "\\ ", " ");
   mf->AddUtilityCommand("ZERO_CHECK", true, no_depends,
                         no_working_directory,
-                        "make", "-f",
this->ConvertToRelativeForMake(this->CurrentReRunCMakeMakefil
+                        "make", "-f", file.c_str());

   // now make the allbuild depend on all the non-utility targets
   // in the project


On Thu, Jul 28, 2011 at 8:39 AM, David Cole <david.cole at kitware.com> wrote:
> I ran these two dashboards this morning:
>
>  before patch: http://cdash.org/CDash/buildSummary.php?buildid=1373777
>  after patch:  http://cdash.org/CDash/buildSummary.php?buildid=1373850
>
> The second one with 131 failing tests is the one with your patch
> applied. I think it may just be a quoting problem with spaces in the
> path, though. I'll make some adjustments, and try again and let you
> know.
>
>
> David
>
>
> On Tue, Jul 26, 2011 at 8:23 PM, David Cole <david.cole at kitware.com> wrote:
>> It looks reasonable at first glance. I'll give it a try with the full
>> CMake test suite tomorrow plus maybe a build of a larger project, and
>> let you know if I discover any gotchas.
>>
>>
>> Thanks,
>> David
>>
>>
>> On Tue, Jul 26, 2011 at 5:16 PM, Johan Björk <phb at spotify.com> wrote:
>>> Hi David,
>>> Please see attached patch. It seems to work with the project I happened to
>>> have open; it's not tested more then that. You know the xcode generator a
>>> whole lot better then me; does it seem reasonable?
>>> Thanks
>>> /Johan
>>>
>>> On Tue, Jul 26, 2011 at 7:31 PM, David Cole <david.cole at kitware.com> wrote:
>>>>
>>>> Sounds like we need a ZERO_CHECK target like we have in the Visual
>>>> Studio generators to enable parallel building in Xcode.
>>>>
>>>> There are currently some problems with the existing CMake re-run
>>>> commands on VS builds when CMake inputs change during the course of
>>>> the build. When that happens, (not something that us CMake devs
>>>> expect, by the way, but not forbidden/prevented either...), CMake
>>>> re-runs during the middle of the build, and we get all the bug reports
>>>> about Visual Studio reload stuff not working (here, and related
>>>> issues: http://public.kitware.com/Bug/view.php?id=11258 and
>>>> particularly, this note:
>>>> http://public.kitware.com/Bug/view.php?id=11440#c26905 )
>>>>
>>>> I don't think there's a specific reason for it... Perhaps it was
>>>> simply easiest that way, or we didn't have a way to depend on custom
>>>> targets at the time, or it was modeled after the VS re-run rules...
>>>> (Or maybe Bill or Brad will chime in if I'm incorrect here...)
>>>>
>>>>
>>>> HTH,
>>>> David
>>>>
>>>>
>>>> On Mon, Jul 25, 2011 at 5:37 PM, Johan Björk <phb at spotify.com> wrote:
>>>> > Hi guys,
>>>> >
>>>> > I noticed that each XCode target has an associated CMake ReRun script
>>>> > phase. Is there a specific reason for this (in difference to having
>>>> > one target that all others depend on that does the ReRun check?)
>>>> >
>>>> > It causes a fair few issues, it fails when you are parallelcompiling
>>>> > targets (It'll start <number of cpus> copies of cmake at the same
>>>> > time), secondly it adds quite some time to the build if you have many
>>>> > targets
>>>> > /Johan
>>>> > _______________________________________________
>>>> > Powered by www.kitware.com
>>>> >
>>>> > Visit other Kitware open-source projects at
>>>> > http://www.kitware.com/opensource/opensource.html
>>>> >
>>>> > Please keep messages on-topic and check the CMake FAQ at:
>>>> > http://www.cmake.org/Wiki/CMake_FAQ
>>>> >
>>>> > Follow this link to subscribe/unsubscribe:
>>>> > http://www.cmake.org/mailman/listinfo/cmake
>>>> >
>>>
>>>
>>
>



More information about the cmake-developers mailing list