[CMake] How do you put specific files in the build directory?

Michael Wild themiwi at gmail.com
Wed Jun 1 11:42:09 EDT 2011


On 06/01/2011 05:31 PM, Doug wrote:
> In my project I build a library and a series of tests; so the result is
> something like:
> 
> build/libblah.so
> build/tests/test_series
> build/tests/test_archives
> etc.
> 
> One of the tests I want to run (test_archives) reads from a zip file;
> however, for my test to run successfully it needs a zip file place into
> the tests folder.
> 
> Current the test zip file lives in src/tests/test.zip
> 
> What's the right way to do this?
> 
> I see some libraries use configure_file to generate headers in the build
> directory, but that doesn't seem useful in this case...
> 
> Cheers,
> Doug.

You'll want configure_file(... COPYONLY).

HTH

Michael


More information about the CMake mailing list