[CMake] grep at build time?

Alexandre GOUAILLARD agouaillard at gmail.com
Sat Jul 18 02:17:48 EDT 2015


dear all,

I'm trying to use cmake as a super build script for another library build
system.

Using add_custom_command and add_custom_target I have managed to handle
most of the steps so far. My libraries and executable are being built as
requested across platform.

Now I'm trying to import the generated tests. Some of the generated
executables during the build step are self-contained tests that I would
like to run using ctest and send to a dashboard. So far I have hardcoded
the revision of the code i'm fetching, and the corresponding list of tests.
However those tests change pretty often, and I would like to have something
more flexible there.

How could I grep the list of tests (knowing that they all end up with
".isolated" a grep would do), and loop through the resulting list
"add_test"ing them one by one AT CMAKE BUILD TIME, after a previous target
has been built?

I googled around, tried a few things, but couldn't figure out a way to make
it happen.

thanks in advance for all advice.

Alex.

-- 
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
CTO - Temasys Communications, S'pore / Mountain View
President - CoSMo Software, Cambridge, MA
------------------------------------------------------------------------------------
sg.linkedin.com/agouaillard

   -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150717/bc4b6e07/attachment.html>


More information about the CMake mailing list