[CMake] How to exclude some files from building?

kipade kipade at 163.com
Thu Mar 30 22:41:58 EDT 2017


There are some files I do not want to build if the specified condition was ture.
For example, for testing, I want build a new file witch include a main entry just
for testing; if not, a new file would be compile for normal task.
I do not want to write two main entries in the same file just using macros to
control compiling. I want to use different clean and simple files.
So, how to do it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170331/dae938fa/attachment-0001.html>


More information about the CMake mailing list