Skip to content

Commit

Permalink
Fix SEMLA build (#7869)
Browse files Browse the repository at this point in the history
Fix #7773. Set the path to the original .mol file as working directory for LVE.
  • Loading branch information
adeas31 committed Sep 7, 2021
1 parent 6c6211b commit c442389
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
27 changes: 17 additions & 10 deletions OMCompiler/Compiler/Script/CevalScript.mo
Expand Up @@ -1274,16 +1274,23 @@ algorithm

case ("loadEncryptedPackage",Values.STRING(filename)::Values.STRING(workdir)::Values.BOOL(bval)::Values.BOOL(b)::Values.BOOL(b1)::Values.BOOL(requireExactVersion)::_)
algorithm
(b, filename) := unZipEncryptedPackageAndCheckFile(workdir, filename, bval);
if (b) then
execStatReset();
filename := Testsuite.friendlyPath(filename);
p := SymbolTable.getAbsyn();
newp := loadFile(filename, "UTF-8", p, b, b1, requireExactVersion);
execStat("loadFile("+filename+")");
SymbolTable.setAbsyn(newp);
end if;
outCache := FCore.emptyCache();
str := System.pwd();
try
0 := System.cd(System.dirname(filename));
(b, filename) := unZipEncryptedPackageAndCheckFile(workdir, filename, bval);
if (b) then
execStatReset();
filename := Testsuite.friendlyPath(filename);
p := SymbolTable.getAbsyn();
newp := loadFile(filename, "UTF-8", p, b, b1, requireExactVersion);
execStat("loadFile("+filename+")");
SymbolTable.setAbsyn(newp);
end if;
outCache := FCore.emptyCache();
0 := System.cd(str);
else
0 := System.cd(str);
end try;
then
Values.BOOL(b);

Expand Down
3 changes: 1 addition & 2 deletions OMCompiler/Makefile.common
Expand Up @@ -72,8 +72,7 @@ semla:
mkdir -p ../OMEncryption/3rdParty/SEMLA/build
# Build SEMLA
(cd ../OMEncryption/3rdParty/SEMLA/build && test -f Makefile || $(CMAKE) -DCMAKE_COLOR_MAKEFILE:Bool=OFF -DTOOL_PRIVATE_KEY_DIRECTORY:String=`pwd`/../src/openssl_keys -DLVE_KEYS_DIRECTORY:String=`pwd`/../src/openssl_keys -DTOOLS_PUBLIC_KEYS_DIRECTORY:String=`pwd`/../src/openssl_keys -DLICENSE_MANAGER:String=testingdummy -DDECRYPTOR:String=default -DOBFUSCATOR:String=dummy -DCMAKE_INSTALL_PREFIX:String=../install ../src -G $(CMAKE_TARGET))
(cd ../OMEncryption/3rdParty/SEMLA/build && $(CMAKE) --build .)
(cd ../OMEncryption/3rdParty/SEMLA/build && $(CMAKE) --build . --target install)
$(MAKE) -C ../OMEncryption/3rdParty/SEMLA/build install
mkdir -p $(builddir_lib)/omc/SEMLA/LVE
cp -pPR ../OMEncryption/3rdParty/SEMLA/install/bin/* $(builddir_lib)/omc/SEMLA
cp -pPR ../OMEncryption/3rdParty/SEMLA/install/lib/libtool.a $(builddir_lib)/omc/SEMLA
Expand Down

0 comments on commit c442389

Please sign in to comment.