2011/10/30 Andrea Crotti <[email protected]>: > I rephrase a bit the question which was probably too long :) > So suppose that I just need to do the following things (but in a portable > way with CMake). > > cd org-mode && make > cd tramp && autoreconf -fi && ./configure && make > cd doxymacs && autoreconf -fi && ./configure && make
I'm not sure to understand why you want to do that with CMake but executing any command in a particular working dir may be done with execute_process, checking the RESULT_VARIABLE value may give you a mean to emulate "&&" by checking the value before going on. But I guess from re-reading your first message that you did already know the command. now again .... autoreconf -fi ./configure seems to be autoconf entity, so since autoconf requires a shell, why would you write a CMake script ? > where some of the commands are repeating... then use CMake foreach or while command. > what could be a way to do this with CMake? If the objective is to run the previous sequence of command as a CMake target then create a CMake (or shell scripts) and call the script in add_custom_target. in a CMake scripts the variable CMAKE_COMMAND contains the path to CMake executable. CMAKE_BUILD_TOOL contains the build tool to use (may be 'make' in your case) may be those would be useful for a 'portable' CMake script. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- 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
