[CMake] Include source files on a per-configuration basis

Robert Dailey rcdailey at gmail.com
Wed Oct 5 16:47:38 EDT 2011


In my particular CMake project, I have three CPP files:

    a.cpp
    b.cpp
    c.cpp

I want 'a.cpp' to be compiled in all configurations (release & debug).<br>
I only want 'b.cpp' to be compiled in DEBUG configuration.<br>
I only want 'c.cpp' to be compiled in RELEASE configuration.

How can I do this? I need something similar to the `debug` and `optimized`
keywords that are accepted by the `target_link_libraries()` CMake operation.

---------
Robert Dailey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111005/cddd9471/attachment-0001.htm>


More information about the CMake mailing list