[CMake] VS2010 and superbuild - Fwd: [Ctk-developers] VS2010 support

David Cole david.cole at kitware.com
Tue Aug 2 07:28:26 EDT 2011


On Mon, Aug 1, 2011 at 5:59 PM, Sascha Zelzer
<s.zelzer at dkfz-heidelberg.de> wrote:
> Hi,
>
> I played around with the ExternalProject unit tests and was able to
> reproduce my problem with the current HEAD ExternalProjects.cmake file. It
> boils down to *not* adding the UPDATE_COMMAND "" line:
>
> 1.) In CMake/Tests/ExternalProject/CMakeLists.txt:487 remove (or comment in)
> the UPDATE_COMMAND argument
> 2.) Build the "TutorialStep1-GIT-bytag" project with VisualStudio 2010 (I am
> using the Express Edition). You will get:
>
> 1>------ Rebuild All started: Project: TutorialStep1-GIT-bytag,
> Configuration: Debug Win32 ------
> 1>  Creating directories for 'TutorialStep1-GIT-bytag'
> 1>  Building Custom Rule
> C:/Development/git/CMake/Tests/ExternalProject/CMakeLists.txt
> 1>  CMake does not need to re-run because
> C:\Development\build\ExternalProject-Test\CMakeFiles\generate.stamp is
> up-to-date.
> 1>  Performing download step (git clone) for 'TutorialStep1-GIT-bytag'
> 1>  Cloning into TutorialStep1-GIT-bytag...
> 1>  done.
> 1>  Note: checking out 'origin/master'.
> 1>
> 1>  You are in 'detached HEAD' state. You can look around, make experimental
> 1>  changes and commit them, and you can discard any commits you make in
> this
> 1>  state without impacting any branches by performing another checkout.
> 1>
> 1>  If you want to create a new branch to retain commits you create, you may
> 1>  do so (now or later) by using -b with the checkout command again.
> Example:
> 1>
> 1>    git checkout -b new_branch_name
> 1>
> 1>  HEAD is now at d197073... Initial import into repo.
> 1>  Performing update step (git fetch) for 'TutorialStep1-GIT-bytag'
> ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
>
> So all other steps after the update step are ignored.
>
> In CTK, we rely on the default update command for git and it works in Visual
> Studio 2008. Any ideas how to fix this will be greatly appreciated.
>
> Thanks,
> Sascha
>
>
>
> On 07/29/2011 12:40 PM, David Cole wrote:
>
> Can you send along the output that you do see when your project is
> downloading, and the build output that immediately follows that? Does it say
> anything about the steps that come after download....?
>
> For example, when I build the ExternalProject test and build only the
> project "TutorialStep5-Local", I get the following output:
>
> 1>  Performing download step (DIR copy) for 'TutorialStep5-Local'
> 1>  No update step for 'TutorialStep5-Local'
> 1>  No patch step for 'TutorialStep5-Local'
> 1>  Performing configure step for 'TutorialStep5-Local'
> 1>  loading initial cache file C:/Users/davidcole/Dashboards/My
> Tests/b20/CMakeExternals/tmp/TutorialStep5-Local/TutorialStep5-Local-cache.cmake
> 1>  -- Check for working C compiler using: Visual Studio 10
> 1>  -- Check for working C compiler using: Visual Studio 10 -- works
> 1>  -- Detecting C compiler ABI info
> 1>  -- Detecting C compiler ABI info - done
> 1>  -- Check for working CXX compiler using: Visual Studio 10
> 1>  -- Check for working CXX compiler using: Visual Studio 10 -- works
> 1>  -- Detecting CXX compiler ABI info
> 1>  -- Detecting CXX compiler ABI info - done
> 1>  -- Looking for log
> 1>  -- Looking for log - found
> 1>  -- Looking for exp
> 1>  -- Looking for exp - found
> 1>  -- Configuring done
> 1>  -- Generating done
> 1>  -- Build files have been written to: C:/Users/davidcole/Dashboards/My
> Tests/b20/CMakeExternals/Build/TutorialStep5-Local
> 1>  Performing build step for 'TutorialStep5-Local'
> .....
>
>
> Do you see any "Performing XXX step" or "No XXX step" output after the
> download occurs...?
>
>
>
> On Fri, Jul 29, 2011 at 6:30 AM, David Cole <david.cole at kitware.com> wrote:
>>
>> Is your VS 2010 in German by any chance? (Or the path name to the
>> installation of VS 2010?)
>>
>> We do not typically test on non-English platforms or build tools...
>>
>>
>> On Fri, Jul 29, 2011 at 2:14 AM, Sascha Zelzer
>> <s.zelzer at dkfz-heidelberg.de> wrote:
>>>
>>> Hi,
>>>
>>> Thanks David and Yuri for the information. In my case (with CTK), there
>>> are no error messages. The download step is successfully completed and the
>>> following steps are just skipped. VS then reports that everything was
>>> successfull (or up-to-date).
>>>
>>> I will play with your test cases and my VS 2010 installation.
>>>
>>> Thanks,
>>> Sascha
>>>
>>> On 07/29/2011 12:30 AM, David Cole wrote:
>>>>
>>>> The ExternalProject test in the CMake test suite passes on Visual Studio
>>>> 2010.
>>>>
>>>> You can see all the variations of ExternalProject usage the test tries
>>>> in this file:
>>>>
>>>> http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/ExternalProject/CMakeLists.txt;h=4a542d722ff127e672a63082c6bb35de1f3ef9cd;hb=b6fb213ed1431321fab0705beb3aae82f451dcc8
>>>>
>>>> Are there any error messages you get? Or are steps just skipped?
>>>>
>>>> ??
>>>> David
>>>>
>>>>
>>>> On Wed, Jul 27, 2011 at 11:38 PM, Yuri Timenkov<yuri at timenkov.ru>
>>>>  wrote:
>>>>>
>>>>> I'm not sure I understood your question, but now I use ExternalProject
>>>>> (from
>>>>> CMake 2.8.4) with Visual Studio 2010 which has 2 externals: one built
>>>>> with
>>>>> custom command (the C# project) and the second one is CMake-based but
>>>>> with
>>>>> VC6 generator. Everything compiles and works fine. But I don't have
>>>>> download
>>>>> step - everything is in my source directory.
>>>>>
>>>>> The only wish I have I filed to Mantis:
>>>>> http://public.kitware.com/Bug/view.php?id=12322
>>>>>
>>>>> Regards,
>>>>> Yuri
>>>>>
>>>>> On Thu, Jul 28, 2011 at 12:37 AM, Sascha Zelzer
>>>>> <s.zelzer at dkfz-heidelberg.de>  wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Is nobody on this list using CTK or Slicer with Visual Studio 2010 in
>>>>>> superbuild mode? If you do, could you please post if you had success
>>>>>> or not?
>>>>>>
>>>>>> Thanks,
>>>>>> Sascha
>>>>>>
>>>>>> On 07/22/2011 06:20 PM, Jean-Christophe Fillion-Robin wrote:
>>>>>>
>>>>>> Hi Folks,
>>>>>>
>>>>>> Before digging further into the problem ... if some your experience
>>>>>> issue
>>>>>> with VS2010 and superbuild .. would be great if you could provide more
>>>>>> details about your investigation.
>>>>>>
>>>>>> Thanks
>>>>>> Jc
>>>>>>
>>>>>> ---------- Forwarded message ----------
>>>>>> From: Sascha Zelzer<s.zelzer at dkfz-heidelberg.de>
>>>>>> Date: Fri, Jul 22, 2011 at 12:07 PM
>>>>>> Subject: Re: [Ctk-developers] VS2010 support
>>>>>> To: ctk-developers at commontk.org
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> there is something very strange going on. The generated VS 2010
>>>>>> projects
>>>>>> (I am using the Express editions, 32bit) for the external dependencies
>>>>>> like
>>>>>> DCMTK, Log4Qt, etc. only call the download step of the
>>>>>> ExternalProject_add
>>>>>> call in our superbuild scripts. The projects are not configured and
>>>>>> build.
>>>>>>
>>>>>> Did anybody experience the same? I tried with and without the VS 2010
>>>>>> SP1
>>>>>> and with CMake 2.8.4 and 2.8.5.
>>>>>>
>>>>>> Thanks,
>>>>>> Sascha
>>>>>>
>>>>>> On 07/22/2011 01:39 PM, Sascha Zelzer wrote:
>>>>>>>
>>>>>>> Hi Folks,
>>>>>>>
>>>>>>> I would like to get Visual Studio 2010 compatibility for CTK.
>>>>>>>
>>>>>>> Currently, it looks like I will have to copy ExternalProject.cmake to
>>>>>>> CTK for the CMAKE_CACHE_ARGS argument. Then a couple of small
>>>>>>> modifications should do.
>>>>>>>
>>>>>>> Any other ideas or objections?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Sascha
>>>>>>> _______________________________________________
>>>>>>> Ctk-developers mailing list
>>>>>>> Ctk-developers at commontk.org
>>>>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>>>>>>
>>>>>> _______________________________________________
>>>>>> Ctk-developers mailing list
>>>>>> Ctk-developers at commontk.org
>>>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> +1 919 869 8849
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>
>>
>
>
>

Thanks for this info... I've reproduced the problem now, too. I'm not
sure what to do about it yet, but I can make it happen: that's the
first step toward a fix.

There should not be a need for an update step if you're snapped to
particular hash or non-tracking branch/tag, though, should there? So,
this seems like a contrived case to me.

In the real project where this is happening, what git branch are you
tracking that makes this a real problem...?


Thanks,
David


More information about the CMake mailing list