Hi All, I have one issue connected with generated code.
What is recommended way to proceed with generators which provides source which is dynamic? The setup looks like: generator has some input, and depending on this input files are generated. >From cmake point of view I need only this list of source files to 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 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake