コンパイルフラグについて
これは InterSystems FAQ サイトの記事です。
コンパイル時のフラグや修飾子の記号と意味については、以下ドキュメントをご参照ください。
なお、開発環境のスタジオやVisual Studio Codeでは、開発環境の設定画面でフラグを変更できます。
- スタジオは、[ツール] > [オプション] > [コンパイラ] > [フラグと最適化]
- VSCodeは、[View] > [Command Palette...]
ターミナルでコンパイルを実行するときは $system.OBJ.CompileAll() などのシステムユーティリティが利用できます。
コンパイルフラグを引数に指定しない場合、デフォルトのコンパイルフラグが利用されます。デフォルトのフラグは $system.OBJ.ShowFlags() で確認できます。
USER>do $system.OBJ.ShowFlags()
b - Include sub classes.
c - Compile. Compile the class definition(s) after loading.
<省略>
Default flags for this namespace =dil
You may change the default flags with the SetFlags(flags,system) classmethod.
b - Include sub classes.
c - Compile. Compile the class definition(s) after loading.
<省略>
Default flags for this namespace =dil
You may change the default flags with the SetFlags(flags,system) classmethod.
デフォルトのコンパイルフラグを変更するには、$system.OBJ.SetFlags() メソッドを使用します。
引数にデフォルトフラグに指定したいフラグを文字列として指定します。戻り値に設定後のフラグが文字列で返ります。
USER>write $system.OBJ.SetFlags("ck")=cdikl