[CMake] Source List Compilation Depending on Configuration

Jörg Kreuzberger j.kreuzberger at procitec.de
Mon Jul 21 05:46:18 EDT 2014


Hi!

if i want to add sources to list of compilation i can rely on CMAKE_BUILD_TYPE.
E.g if i want to add a source file only for release, i append it to list of source files only then.

BUT: how can i do this for multi configuration like vs?
So i want to add it to the sources, so that it appears in vs, but only want to compile it in release build?

Is there an easy way to handle this?

Thanks,
Joerg

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden.
Thank you!




More information about the CMake mailing list