はい、それができる:
configure_file(<input> <output>
[COPYONLY] [ESCAPE_QUOTES] [@ONLY]
[NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
Example.h.in
#ifndef EXAMPLE_H
#define EXAMPLE_H
/*
* These values are automatically set according to their cmake variables.
*/
#define EXAMPLE "${VALUE}"
#define VERSION "${VERSION}"
#define NUMBER ${NUMBER}
#endif /* EXAMPLE_H */
あなたのcmakeのファイルで:設定済み
set(EXAMPLE "This is an example")
set(VERSION "1.0")
set(NUMBER 3)
configure_file(Example.h.in Example.h)
Example.h
:
#ifndef EXAMPLE_H
#define EXAMPLE_H
/*
* These values are automatically set according to their cmake variables.
*/
#define EXAMPLE "This is an example"
#define VERSION "1.0"
#define NUMBER 3
#endif /* EXAMPLE_H */
ドキュメント:あなたは言語を翻訳したいところで
。あなたはもっと具体的になりますか? – Neox
この質問は不明です。 CMakeは、autoconfのやり方でconfigureというスクリプトを生成することはできません。これは、同様の仕事をするために異なった働きをします。しかし、ソースツリーのファイルに対して設定操作を行うことができます。どのような言語の翻訳が行われていますか? emscripteと何が関係していますか? – mabraham