[CMake] macros with arguments

Tom Kacvinsky tom.kacvinsky at vectorcast.com
Tue May 19 13:28:05 EDT 2015


HI,

Background:  trying to build several executables that have the same target
link libraries, compile flags, etc..., but different source files.  Rather
than duplicate all of the necessary bits for each target, I thought I'd
write a macro that takes in arguments (the target name and list of files).

But I am am unsure (based on the cmake documentation for macro()) as how to
pick out the target and list of files so I can do the right thing with
add_executable.

Any ideas?

Thanks,

Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150519/8a8c51fe/attachment.html>


More information about the CMake mailing list