Alexander Neundorf wrote:

No, that's wrong in principle.
In the cmake files there is no current target, they describe all targets.

If you want to do something when some target is built, you have to do this via dependencies, either via add_custom_command() or add_custom_target().

Hm, the reason I want it is because of how I am using CMake and triggering a generator. I have to translate .e files (Euphoria) into .c files when the source .e files change. Yesterday, Bill Hoffman helped me quite a bit with this and I finally got that working. The only problem is that we translate 3 main programs, the interpreter, the translator and the backend. Each one produces about 115,000 lines of C code and it takes ~20 seconds for each target. So, here's what happens... I edit common.e which is included in all three programs (interpreter, translator and backend). Right now I am working on the interpreter, so I do:

wmake eui To rebuild the interpreter. However, CMake now sees that common.e has changed, it triggers running cmake.exe to rebuild the makefiles and when it does so, all three produces are triggered for a generation because common.e has changed. That would be correct if I was building all three programs, however, I am only working on the interpreter, I don't want to wait an extra 40 seconds to translate the backend and translator when I am not working on it. Now, wmake eui only compiles the interpreter source files, but the translation is time consuming (considering you edit, compile, edit compile, etc...).

Some how I would like to realize that they want to build the interpreter only, don't worry about re-translating the translator and backend right now.

You can see my two main CMake files in : http://rapideuphoria.svn.sourceforge.net/viewvc/rapideuphoria/trunk/source/ to see how I am doing this currently. I just can't figure out how to not re-translate the other programs that I really don't care about right now.

Thanks for any help,

Jeremy

_______________________________________________
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

Reply via email to