[CMake] ExternalProject_Add, race conditions, MSVC_IDE

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Jan 24 10:00:54 EST 2011


On Mon, Jan 24, 2011 at 9:50 AM, David Cole <david.cole at kitware.com> wrote:
> On Sat, Jan 22, 2011 at 8:15 AM, Pau Garcia i Quiles <pgquiles at elpauer.org>
> wrote:
>>
>> Hello,
>>
>> I've been using ExternalProject_Add and I have to say IMHO it's one of
>> the best features added to CMake in the last years. It works great for
>> me on Linux (makefiles), MSVC2010 (NMake Makefiles) and Mac
>> (makefiles).
>>
>> Together with a small .sh (Unix) and a .bat (Windows), you can make
>> your project full bootstrappable and only depend on the user having a
>> C++ compiler (not even CMake, which has been the biggest argument
>> against CMake by autotools fans)
>>
>> Now to the bad news:
>>
>> - I have experienced lots of race conditions on Windows, both with
>> Cygwin and NMake
>
> What sort of race conditions? And how do you know they are race conditions?
>
I would be interested too, the Titan project has quite a few external
projects and I have not seen pathological race conditions. There are
occasional issues, such as an 8192 character limit on command line
arguments, and a recent change in CMake master alleviates this by
optionally using a file to pass the majority of initial cache
arguments into the external projects - again Titan has examples of
this.
>>
>> - I've tried to use it with MSVC solutions but if fails miserable with
>> errors about cmd.exe. Is this by design or is it a bug?
>
> We do not intend to fail miserably, so I'm going to say that it's not by
> design... but if you are specifying commands that will not succeed, then
> perhaps it's by design on your side... :-)
>
I have built Titan successfully using MSVC 2008 and 2008 Express IDE
and NMake based builds. Quite a few of the Titan developers routinely
use the MSVC IDE as far as I am aware. I think there are other
projects out there using MSVS and the IDE solutions too although I
think there are still (maybe) some issues with 2010.

Marcus


More information about the CMake mailing list