[CMake] Ignoring return codes on ADD_CUSTOM_COMMAND (hhc.exe)
Jesper Eskilson
jesper at eskilson.se
Mon Oct 22 09:40:18 EDT 2007
Stefan Buschmann wrote:
> Hi all,
>
> I'm currently having a problem using the HTMLHelp Compiler (hhc.exe) in
> my CMake-Scripts. I build the doxygen docs, then call hhc.exe and the
> .chm file is created correctly.
> But hhc.exe seems to return an error code, so the build has failed and
> my post-build commands are not invoked.
>
> 1) Did anyone have similar problems with hhc.exe?
Yes.
> Any ideas why hhc.exe
> is returning an error code although the .chm file is generated correctly
> and there are no error messages on the output?
No. Afaik, you can't use the error code for anything.
> 2) Is there a way to tell ADD_CUSTOM_COMMAND to ignore the return value
> of the process and consider it as always successfull?
I couldn't find any, so I used a Ruby script wrapper to invoke hhc.exe
and ignore the return value:
if not system((ARGV.collect do |s| "\"#{s}\"" end).join(" "))
puts "Command failed, ignoring exit code."
end
--
/Jesper
More information about the CMake
mailing list