Hi,<br><br>I'm currently trying to use add_custom_command, but I do not get any output (it's working fine in other projects, with Bison and Flex).<br><br>Basically, I have a CMakeLists.txt file with<br><br>include(CMakeCallPerl.cmake)<br>
PERL_SCRIPT("${GLISS_PATH}/<a href="http://nmp2nml.pl">nmp2nml.pl</a>" "ppc.nmp")<br><br><br>And in my CMakeCallPerl.cmake file :<br><br>find_program(PERL perl)<br>IF(PERL)<br> MACRO(PERL_SCRIPT SCRIPT FILENAME)<br>
GET_FILENAME_COMPONENT(PATH "${FILENAME}" PATH)<br> GET_FILENAME_COMPONENT(PREFIX "${FILENAME}" NAME_WE)<br> SET(OUTFILE "${PREFIX}.nml")<br> MESSAGE(STATUS "${PERL} ${SCRIPT} ${FILENAME} ${OUTFILE}")<br>
ADD_CUSTOM_COMMAND(<br> OUTPUT "${OUTFILE}"<br> COMMAND "${PERL}"<br> "${SCRIPT}"<br> "${FILENAME}"<br> "${OUTFILE}"<br> )<br> SET_SOURCE_FILES_PROPERTIES("${OUTFILE}" PROPERTIES GENERATED TRUE)<br>
ENDMACRO(PERL_SCRIPT)<br>ENDIF(PERL)<br><br>What am I doing wrong ?<br><br>Copy/Pasting the MESSAGE output in command line, everything works fine, but not when compiling after generating with CMake.<br>(it looks like this : C:/Win16App/rational/TestRealTime/bin/intel/win32/perl.exe D:/workspace/ppc/../gliss/<a href="http://nmp2nml.pl">nmp2nml.pl</a> ppc.nmp ppc.nml)<br>
There is also no mention for Perl in any CMake generated file.<br>Using Windows XP and MinGW<br><br>Regards,<br><br>Maxime<br>