[CMake] Where to put generated files.

John Drescher drescherjm at gmail.com
Wed Jun 12 15:33:16 EDT 2013


On Wed, Jun 12, 2013 at 3:30 PM, William McKenzie
<wsmckenz at cartewright.com> wrote:
> Just wondering what the common convention is here. If I have some generated
> c/c++ source files, say from gSoap or Lex/Yacc (and my build rules take care
> of the generation), is the convention to generate these into the build
> folder, or the original source folder? I understand I could use either, and
> in some ways it makes more sense for them to go into the build folder. But
> it also feels a little weird that all of my c files are not in the same
> place if I do that.
>
> Just wondering how other people do it.

I generate files into the build folder. This makes backups and version
control trivial since I no longer have to manage excludes since every
file in the source tree should be in the version control.

John


More information about the CMake mailing list