Skip to content

Commit

Permalink
Exposed Settings.getHomeDir as API function getHomeDirectoryPath (#7954)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Sep 30, 2021
1 parent d6d4eaf commit f465ce5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OMCompiler/Compiler/FrontEnd/ModelicaBuiltin.mo
Expand Up @@ -1516,6 +1516,12 @@ annotation(Documentation(info="<html>
preferredView="text");
end getModelicaPath;

function getHomeDirectoryPath "This returns the path to user HOME directory."
output String homeDirectoryPath;
external "builtin";
annotation(preferredView="text");
end getHomeDirectoryPath;

function setCompilerFlags
input String compilerFlags;
output Boolean success;
Expand Down
6 changes: 6 additions & 0 deletions OMCompiler/Compiler/NFFrontEnd/NFModelicaBuiltin.mo
Expand Up @@ -1740,6 +1740,12 @@ annotation(Documentation(info="<html>
preferredView="text");
end getModelicaPath;

function getHomeDirectoryPath "This returns the path to user HOME directory."
output String homeDirectoryPath;
external "builtin";
annotation(preferredView="text");
end getHomeDirectoryPath;

function setCompilerFlags
input String compilerFlags;
output Boolean success;
Expand Down
3 changes: 3 additions & 0 deletions OMCompiler/Compiler/Script/CevalScript.mo
Expand Up @@ -803,6 +803,9 @@ algorithm
case ("setModelicaPath",_)
then Values.BOOL(false);

case ("getHomeDirectoryPath",{})
then Values.STRING(Settings.getHomeDir(Testsuite.isRunning()));

case ("getLanguageStandard",{})
then Values.STRING(Config.languageStandardString(Config.getLanguageStandard()));

Expand Down

0 comments on commit f465ce5

Please sign in to comment.