No subject


Tue Nov 1 15:57:14 EDT 2011


create library.

Generator is providing simple command to generate such a list.


During cmake phase, I'm calling generator to generate list.cmake with
list of source file,
then such a list is included, and configuration is generated. Source
file are marked as generated, and appropriate
ADD_CUSTOM_COMMAND(OUTPUT list) is registerd.


In lifecycle cmake -> make -> edit-input_files -> make -> edit ... make

everything works smooth with one remark, If you will edit input files
in a way that new source file will be introduced, then regeneration is
not enough, I need to regenerate configuration,
with current approach it looks like:
edit-input-adding-new-file ->
     make-step1-generate: will regenerate the code + regenerate
cmakelist - since new file is there
     make-step2-compile-sources:
     make-step3-linking - will fail since new file is not added to
configuration,

with next run of make, cmake --check-build-system will recognize
changes in cmakelist and configuration will be regenerated, and build
will be successfull (if code changes was smart enough:) )

The question is if there are some hooks to cmake --check-build-system
that also additionaly my generate --cmake action will be called? (to
regenerate cmakelist which holds list of files)

Or maybe my approach is wrong?

thanks in advance
Lukasz


-- 
Lukasz Tasz


More information about the CMake mailing list