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