[CMake] Selectively adding source files and compiling assembly sources
Alexander Neundorf
a.neundorf-work at gmx.net
Mon May 28 05:34:37 EDT 2012
On Monday 28 May 2012, Petr Kmoch wrote:
> Hi Johannes,
>
> the only solution I can think of is something like:
>
> #
> option(WITH_A ...)
> option(WITH_B ...)
>
> set(MySources always/present/files ...)
>
> if(WITH_A)
> list(APPEND MySources files/for/a ...)
> endif()
>
> if(WITH_B)
> list(APPEND MySources files/for/b ...)
> endif()
>
> add_executable(MyExec ${MySources})
Yes, that's the way t do it.
> I have never used assembler files, so I can't comment there,
Did you enable the ASM language ?
> and I don't think there's an option for better GUI grouping than string
> prefixes.
Yes, they are grouped by prefixes in their name.
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120528/cf7d4970/attachment.htm>
More information about the CMake
mailing list