On 12/02/2010 08:25 AM, Alan W. Irwin wrote: > On 2010-12-02 06:32+0100 Michael Wild wrote: > >> On 12/02/2010 12:37 AM, luxInteg wrote: >>> On Tuesday 30 November 2010 22:43:34 luxInteg wrote: >>>> Greetings >>>> >>>> I an learnig cmake. >>> >>> My test project is as follows:- >>> linux machine with pyQt4, sip-4.10.2,qt-4.6.2 and cmake-2.8.2 >>> >>> ---stepA: I have a file -fileA.sip. >>> ---stepB: Upon execution of fileA.sip two files files -fileC.cpp and >>> fileD.cpp result, >>> ---stepC: fileC.cpp and fileD,cpp are compiled into a shared library. >>> >>> I am ok with stepC. I do not know how to carry out step B >>> execution within >>> cmake. >>> >>> advice would be appreciated. >>> >>> sincerely >>> luxInteg >> >> >> Use ADD_CUSTOM_COMMAND. > > @Michael: that advice is not correct. add_custom_command sets up a > command to be run at "make" time. Instead, the execute_process command > should be used to run a command at "CMake" time which is what the OP > needs to generate his *.cpp files. > > @LuxInteg: See the CMakeLists.txt file at > http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/bindings/qt_gui/pyqt4/ > > for an example of generating source code with sip. > > Alan
Alan, you seem to be a bit confused ;-) having looked at your CMakeLists.txt file, it's actually using ADD_CUSTOM_COMMAND, just as I mentioned in my last message. BTW, you don't need the GENERATED source-file property, because that is handled by ADD_CUSTOM_COMMAND too. Michael _______________________________________________ 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