Michael Ellery <[email protected]> writes:

> https://github.com/mellery451/gen_header
> 
> works for with me with makefile generator.

Yes, that's similar to what I have found yesterday after my posting.
It works but I'd prefer not to have to add the dependency to the
add_executable() specification.

I am new to cmake, but I still prefer standard make.  I work in a
project were I am supposed to use cmake, so I try to learn about it by
doing little examples.

But I find cmake makes simple things more complicated, it seems much
bigger and more complex than make and provides less flexibility.  I
prefer simple tools with simple basic primitives that can be combined
flexibly to build powerful systems.

I dislike that I should add tab.h as dependency to the executable
since it's actually the object file that depends on the header file.
The executable then only depends on the object file.

Say I have

        add_custom_command(output crctab.h command mkcrctab > crctab.h)
        add_executable(send send.c crc.c)
        add_executable(recv recv.c crc.c)
        add_executable(foo  foo.c  crc.c)

and crc.c does #include "crctab.h".  Would I then really have to add
crctab.h to all add_executable() specifications?  IMO the executables
shouldn't have to "know" how crc.c is implemented.  The just link
crc.o.        

urs
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to