Skip to content

Commit 4105a55

Browse files
committed
- Added API commands: getCompiler getCXXCompiler getLinker - Added new OMEdit setting: Compiler git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13618 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 12a6c9c commit 4105a55

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

Compiler/FrontEnd/ModelicaBuiltin.mo

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,12 @@ external "builtin";
10331033
annotation(preferredView="text");
10341034
end generateSeparateCode;
10351035

1036+
function getLinker
1037+
output String linker;
1038+
external "builtin";
1039+
annotation(preferredView="text");
1040+
end getLinker;
1041+
10361042
function setLinker
10371043
input String linker;
10381044
output Boolean success;
@@ -1047,14 +1053,26 @@ external "builtin";
10471053
annotation(preferredView="text");
10481054
end setLinkerFlags;
10491055

1050-
function setCompiler
1056+
function getCompiler "CC"
1057+
output String compiler;
1058+
external "builtin";
1059+
annotation(preferredView="text");
1060+
end getCompiler;
1061+
1062+
function setCompiler "CC"
10511063
input String compiler;
10521064
output Boolean success;
10531065
external "builtin";
10541066
annotation(preferredView="text");
10551067
end setCompiler;
10561068

1057-
function setCXXCompiler
1069+
function getCXXCompiler "CXX"
1070+
output String compiler;
1071+
external "builtin";
1072+
annotation(preferredView="text");
1073+
end getCXXCompiler;
1074+
1075+
function setCXXCompiler "CXX"
10581076
input String compiler;
10591077
output Boolean success;
10601078
external "builtin";

Compiler/Script/CevalScript.mo

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,12 +1528,24 @@ algorithm
15281528
then
15291529
(cache,Values.STRING(str),st);
15301530

1531+
case (cache,env,"getCompiler",{},st,_)
1532+
equation
1533+
str = System.getCCompiler();
1534+
then
1535+
(cache,Values.STRING(str),st);
1536+
15311537
case (cache,env,"setCompiler",{Values.STRING(str)},st,_)
15321538
equation
15331539
System.setCCompiler(str);
15341540
then
15351541
(cache,Values.BOOL(true),st);
15361542

1543+
case (cache,env,"getCXXCompiler",{},st,_)
1544+
equation
1545+
str = System.getCXXCompiler();
1546+
then
1547+
(cache,Values.STRING(str),st);
1548+
15371549
case (cache,env,"setCXXCompiler",{Values.STRING(str)},st,_)
15381550
equation
15391551
System.setCXXCompiler(str);
@@ -1546,6 +1558,12 @@ algorithm
15461558
then
15471559
(cache,Values.BOOL(true),st);
15481560

1561+
case (cache,env,"getLinker",{},st,_)
1562+
equation
1563+
str = System.getLinker();
1564+
then
1565+
(cache,Values.STRING(str),st);
1566+
15491567
case (cache,env,"setLinker",{Values.STRING(str)},st,_)
15501568
equation
15511569
System.setLinker(str);

0 commit comments

Comments
 (0)