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