Skip to content

Commit 5dc61f6

Browse files
adrpoOpenModelica-Hudson
authored andcommitted
any target starting with 'msvc' is msvc
Belonging to [master]: - OpenModelica/OMCompiler#3090
1 parent c33af09 commit 5dc61f6

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

Compiler/SimCode/SimCodeFunctionUtil.mo

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,14 +1963,8 @@ end generateExtFunctionLibraryDirectoryFlags2;
19631963
protected function getGerneralTarget
19641964
input String target;
19651965
output String generalTarget;
1966-
algorithm
1967-
generalTarget := matchcontinue (target)
1968-
case("msvc10")then "msvc";
1969-
case("msvc12")then "msvc";
1970-
case("msvc13")then "msvc";
1971-
case("msvc14")then "msvc";
1972-
else target;
1973-
end matchcontinue;
1966+
algorithm
1967+
generalTarget := if (System.stringFind(target, "msvc") == 0) then "msvc" else target;
19741968
end getGerneralTarget;
19751969

19761970

Compiler/Util/System.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function strcmp_offset
9595
external "C" outInteger=System_strcmp_offset(string1,offset1,length1,string2,offset2,length2) annotation(Library = "omcruntime");
9696
end strcmp_offset;
9797

98-
public function stringFind "locates substring searchStr in str. If succeeds return position, otherwise return -1"
98+
public function stringFind "locates substring searchStr in str. If succeeds return position (starting from 0), otherwise return -1"
9999
input String str;
100100
input String searchStr;
101101
output Integer outInteger;

0 commit comments

Comments
 (0)