[CMake] add_executable with generated files

Tom Kacvinsky tom.kacvinsky at vectorcast.com
Wed May 20 15:27:23 EDT 2015


My mistake, the tutorials I looked at were for using generated files in
add_library.  I do have a working add_library with generated files, but I
can't seem to get generated files to work with add_executable.  So is there
a difference between the two?  add_library allows for use of generated
files, but add_executable does not?

On Wed, May 20, 2015 at 2:57 PM, Tom Kacvinsky <tom.kacvinsky at vectorcast.com
> wrote:

> I have need to make an executable that depends on a generated file.  I've
> read several tutorials on how to do this, but even after following those
> instructions, I get this error:
>
> CMake Error at CMakeLists.txt:436 (add_executable):
>   Cannot find source file:
>
>     .chop/maint.adb
>
>   Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
>
> has anyone done this, and if so, do you have tips on how to proceed?
>
> Thanks,
>
> Tom
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150520/ce3e6147/attachment.html>


More information about the CMake mailing list