[CMake] Build a program and get its output during "cmake" run

Petr Kmoch petr.kmoch at gmail.com
Tue Jun 7 03:23:20 EDT 2016


Hi Yaron,

I believe you're looking for CMake's try_run() command:
https://cmake.org/cmake/help/latest/command/try_run.html

Petr

On 7 June 2016 at 09:15, Yaron Cohen-Tal <yaronct at gmail.com> wrote:

> Hi,
>
> I'd like to build a C++ program and get its output during "cmake" run, not
> during the project build. "CHECK_CXX_SOURCE_RUNS" only gives me the exit
> code, but I need the output from the program. Anyway to do it?
>
> Thanx,
> Yaron
>
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160607/04653930/attachment-0001.html>


More information about the CMake mailing list