[ITK-dev] Use Vcvarsall.bat in CTest script

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Fri Jul 22 16:17:43 EDT 2016


Or you could also have a .bat file that would take two params:
* path to vcvars batch file
* command invoking ctest

You could then invoke cmd.exe using execute_process and give the bat file +
arguments

Jc


On Fri, Jul 22, 2016 at 3:07 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <
blowekamp at mail.nih.gov> wrote:

> Generating that bat file on the fly would not be too bad.
>
> I am imagining adding something like the following line to the beginning
> of the nightly ctest scripts:
>
> # BAT:  "C:\Program Files (x86)\Microsoft Visual Studio
> 9.0\VC\bin\vcvarsx86_amd64.bat"
>
> Which tells my script to generate your suggested bat file.
>
>
> Thanks JC!
>
>
>
> On Jul 22, 2016, at 2:17 PM, Jean-Christophe Fillion-Robin <
> jchris.fillionr at kitware.com> wrote:
>
> Hi Brad,
>
> If you create a .bat file like the following, it should work as expected:
>
> call "C:\Program Files (x86)\Microsoft Visual Studio
> 9.0\VC\bin\vcvarsx86_amd64.bat"
>
> call "C:\path\to\ctest.exe -S C:\path\to\script"
>
> Hth
> Jc
>
> On Fri, Jul 22, 2016 at 9:31 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <
> blowekamp at mail.nih.gov> wrote:
>
>> Hello,
>>
>> I am finally wanting to start using ninja with some of my windows builds.
>> It seems the critical thing is to invoke the appropriate Vcvarsall.bat file
>> before the cmake configuration.
>>
>> Currently I am just using a ctest script  with ctest_run_script to drive
>> my dashboard nightly dashboard scripts. How can I invoke the bat file and
>> then get a ctest command in a sub-process?
>>
>> Currently I have something like this:
>>
>> foreach( NEXT_SCRIPT IN LISTS MORE_CTEST_SCRIPTS )
>>          message( "Starting to execute script: ${NEXT_SCRIPT}..." )
>>     ctest_run_script( NEW_PROCESS ${NEXT_SCRIPT} )
>> endforeach()
>>
>> And I want something like the following so that the NEXT_SCRIPT with have
>> the correct environment:
>>
>> foreach( NEXT_SCRIPT IN LISTS MORE_CTEST_SCRIPTS )
>>      message( "Starting to execute script: ${NEXT_SCRIPT}...” )
>>      NEW PROCESS
>>         RUN Vcvarsall.bat
>>         ctest_run_script( NEW_PROCESS ${NEXT_SCRIPT} )
>> endforeach()
>>
>>
>>
>> My googling skills are not finding a solution that is as simple as I
>> would expect it to be.
>>
>> Thank you for the help with this simple question!
>> Brad
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/insight-developers
>>
>
>
>
> --
> +1 919 869 8849
>
>
>


-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-developers/attachments/20160722/57873c8a/attachment.html>


More information about the Insight-developers mailing list