0
我想在cmake中使用mustache作为简单的模板引擎来生成代码。在cmake中执行小胡子(作为ruby脚本)execute_process
我试着用execute_process
执行它如下:
execute_process(COMMAND "/path/to/mustache" "<data> <template>")
但它表示,它不是有效的Win32应用程序。事实上,胡子是一个Ruby脚本:
#!D:/programs/Ruby23/bin/ruby.exe
#
# This file was generated by RubyGems.
#
# The application 'mustache' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = ">= 0.a"
if ARGV.first
...
所以,我想:
execute_process(COMMAMD "/path/to/ruby" "/path/to/mustache --help")
但它不工作要么... No such file or directory -- D:/programs/Ruby23/bin/mustache --help (LoadError)
如何执行的CMake Ruby脚本execute_process?
'但它不工作,要么...' - 它说,红宝石是不是WIN32应用程序呢?或者是什么? – Tsyvarev
没有这样的文件或目录 - D:/ programs/Ruby23/bin/mustache --help(LoadError) – jvtrudel
ok。这些提示必须作为列表传递......''''execute_process(COMMAMD“/ path/to/ruby”“/ path/to/mustache”“--help”)''''谢谢你的提示。 – jvtrudel