<div dir="ltr"><div><div><div><div>Or you could also have a .bat file that would take two params:<br></div>* path to vcvars batch file<br></div>* command invoking ctest<br><br></div>You could then invoke cmd.exe using execute_process and give the bat file + arguments<br><br></div>Jc <br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 22, 2016 at 3:07 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div>Generating that bat file on the fly would not be too bad.</div>
<div><br>
</div>
<div>I am imagining adding something like the following line to the beginning of the nightly ctest scripts:</div>
<div><br>
</div>
<div># BAT: "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvarsx86_amd64.bat"</div>
<div><br>
</div>
<div>Which tells my script to generate your suggested bat file.</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks JC!
<div><br>
</div>
</div><div><div class="h5">
<div><br>
</div>
<div><br>
<div>
<blockquote type="cite">
<div>On Jul 22, 2016, at 2:17 PM, Jean-Christophe Fillion-Robin <<a href="mailto:jchris.fillionr@kitware.com" target="_blank">jchris.fillionr@kitware.com</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>Hi Brad, <br>
<br>
</div>
If you create a .bat file like the following, it should work as expected:<br>
<br>
call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvarsx86_amd64.bat"<br>
<br>
</div>
call "C:\path\to\ctest.exe -S C:\path\to\script"<br>
<br>
</div>
Hth<br>
</div>
Jc<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Jul 22, 2016 at 9:31 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C]
<span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
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.<br>
<br>
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?<br>
<br>
Currently I have something like this:<br>
<br>
foreach( NEXT_SCRIPT IN LISTS MORE_CTEST_SCRIPTS )<br>
message( "Starting to execute script: ${NEXT_SCRIPT}..." )<br>
ctest_run_script( NEW_PROCESS ${NEXT_SCRIPT} )<br>
endforeach()<br>
<br>
And I want something like the following so that the NEXT_SCRIPT with have the correct environment:<br>
<br>
foreach( NEXT_SCRIPT IN LISTS MORE_CTEST_SCRIPTS )<br>
message( "Starting to execute script: ${NEXT_SCRIPT}...” )<br>
NEW PROCESS<br>
RUN Vcvarsall.bat<br>
ctest_run_script( NEW_PROCESS ${NEXT_SCRIPT} )<br>
endforeach()<br>
<br>
<br>
<br>
My googling skills are not finding a solution that is as simple as I would expect it to be.<br>
<br>
Thank you for the help with this simple question!<br>
Brad<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank">
www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-developers</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div data-smartmail="gmail_signature"><a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">+1 919 869 8849<br></div>
</div>