[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Is it possible to run ctest outside build tree?
From:       Craig Scott <craig.scott () crascit ! com>
Date:       2017-03-26 8:51:59
Message-ID: CA+dygYn4dsX4AuJCeCnVGmc7Z=xMvOCRnqGBTiSsLZFXnHb89Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Not sure if this is the sort of thing you are looking for, but you can use
the cmake -E chdir command as a way to run an arbitrary command from
another directory without having to create any extra scripts, perform shell
logic, etc. For example:

cmake -E chdir /my/build/tree ctest ....




On Sun, Mar 26, 2017 at 7:29 PM, Eric Noulard <eric.noulard@gmail.com>
wrote:

> This works but it is not possible to pass filtering argument (-L or -R) to
> ctest this way.
>
> Le 26 mars 2017 10:13, "Dvir Yitzchaki" <Dvir.Yitzchaki@ceva-dsp.com> a
> écrit :
>
>> How about
>>
>>
>>
>> cmake --build /my/build/tree --target test
>>
>>
>>
>> Regards,
>>
>> Dvir
>>
>>
>>
>> *From:* CMake [mailto:cmake-bounces@cmake.org] *On Behalf Of *Eric
>> Noulard
>> *Sent:* Friday, March 24, 2017 13:04
>> *To:* CMake Mailinglist <cmake@cmake.org>
>> *Subject:* [CMake] Is it possible to run ctest outside build tree?
>>
>>
>>
>> Is possible to run ctest outside the builld tree and how?
>>
>> typical use is when I have an out of source build I may be in the source
>> tree
>>
>> and want to run tests without manually going to build tree.
>>
>>
>>
>> i.e. I currently do:
>>
>>
>>
>> ninja -C /my/build/tree
>>
>>
>>
>> is there a similar way to do that with ctest (other than creating my own
>> script, shell alias etc...)?
>>
>>
>>
>> --
>>
>> Eric
>>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Craig Scott
Melbourne, Australia
https://crascit.com

[Attachment #5 (text/html)]

<div dir="ltr">Not sure if this is the sort of thing you are looking for, but you can \
use the cmake -E chdir command as a way to run an arbitrary command from another \
directory without having to create any extra scripts, perform shell logic, etc. For \
example:<div><br></div><div>cmake -E chdir /my/build/tree ctest \
....</div><div><br></div><div><br></div><div><br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 26, 2017 at 7:29 PM, \
Eric Noulard <span dir="ltr">&lt;<a href="mailto:eric.noulard@gmail.com" \
target="_blank">eric.noulard@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="auto">This works but it is not possible to pass \
filtering argument (-L or -R) to ctest this way.</div><div class="HOEnZb"><div \
class="h5"><div class="gmail_extra"><br><div class="gmail_quote">Le  26 mars 2017 \
10:13, &quot;Dvir Yitzchaki&quot; &lt;<a href="mailto:Dvir.Yitzchaki@ceva-dsp.com" \
target="_blank">Dvir.Yitzchaki@ceva-dsp.com</a>&gt; a écrit  :<br \
type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_-7618132429571653519m_-5575521211689626749WordSection1">
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">How \
about<u></u><u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> \
<u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">cmake \
--build /my/build/tree --target test<u></u><u></u></span></p> <p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> \
<u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Regards,<u></u><u></u></span></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Dvir<u></u><u></u></span></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> \
<u></u></span></p> <p class="MsoNormal"><b><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> CMake [mailto:<a \
href="mailto:cmake-bounces@cmake.org" \
target="_blank">cmake-bounces@cmake.or<wbr>g</a>] <b>On Behalf Of </b>Eric \
Noulard<br> <b>Sent:</b> Friday, March 24, 2017 13:04<br>
<b>To:</b> CMake Mailinglist &lt;<a href="mailto:cmake@cmake.org" \
target="_blank">cmake@cmake.org</a>&gt;<br> <b>Subject:</b> [CMake] Is it possible to \
run ctest outside build tree?<u></u><u></u></span></p> <p class="MsoNormal"><u></u>  \
<u></u></p> <div>
<p class="MsoNormal">Is possible to run ctest outside the builld tree and \
how?<u></u><u></u></p> <div>
<p class="MsoNormal">typical use is when I have an out of source build I may be in \
the source tree<u></u><u></u></p> </div>
<div>
<p class="MsoNormal">and want to run tests without manually going to build \
tree.<u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div>
<p class="MsoNormal">i.e. I currently do:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div>
<p class="MsoNormal">ninja -C /my/build/tree<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div>
<p class="MsoNormal">is there a similar way to do that with ctest (other than \
creating my own script, shell alias etc...)?<u></u><u></u></p> </div>
<div>
<div>
<p class="MsoNormal"><u></u>  <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Eric<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div></div>
</div></div><br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" \
target="_blank">www.kitware.com</a><br> <br>
Please keep messages on-topic and check the CMake FAQ at: <a \
href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" \
target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br> <br>
Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:<br> <br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" \
target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br> CMake \
Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" \
target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br> CMake \
Training Courses: <a href="http://cmake.org/cmake/help/training.html" \
rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
 <br>
Visit other Kitware open-source projects at <a \
href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" \
target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br> <br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" \
target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br></blockquote></div><br><br \
clear="all"><div><br></div>-- <br><div class="gmail_signature" \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a \
href="https://crascit.com" \
target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div> \
</div>



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic