@@ -3370,7 +3370,7 @@ algorithm
33703370 System . removeFile(logfile);
33713371 end if ;
33723372 nozip := Autoconf . make+ " -j" + intString(Config . noProc()) + " nozip" ;
3373- includeDefaultFmi := "-I" + Settings . getInstallationDirectoryPath() + "/include/omc/c/fmi" ;
3373+ includeDefaultFmi := Settings . getInstallationDirectoryPath() + "/include/omc/c/fmi" ;
33743374 finishedBuild := match Util . stringSplitAtChar(platform, " " )
33753375 case {"dynamic" }
33763376 algorithm
@@ -3384,7 +3384,7 @@ algorithm
33843384 makefileStr := System . stringReplace(makefileStr, "@NEED_RUNTIME@" , "" );
33853385 makefileStr := System . stringReplace(makefileStr, "@NEED_DGESV@" , "" );
33863386 makefileStr := System . stringReplace(makefileStr, "@FMIPLATFORM@" , System . modelicaPlatform());
3387- makefileStr := System . stringReplace(makefileStr, "@CPPFLAGS@" , includeDefaultFmi);
3387+ makefileStr := System . stringReplace(makefileStr, "@CPPFLAGS@" , "-I" + includeDefaultFmi);
33883388 makefileStr := System . stringReplace(makefileStr, "@LIBTYPE_DYNAMIC@" , "1" );
33893389 makefileStr := System . stringReplace(makefileStr, "@BSTATIC@" , Autoconf . bstatic);
33903390 makefileStr := System . stringReplace(makefileStr, "@BDYNAMIC@" , Autoconf . bdynamic);
@@ -3405,7 +3405,7 @@ algorithm
34053405 makefileStr := System . stringReplace(makefileStr, "@NEED_RUNTIME@" , "" );
34063406 makefileStr := System . stringReplace(makefileStr, "@NEED_DGESV@" , "" );
34073407 makefileStr := System . stringReplace(makefileStr, "@FMIPLATFORM@" , System . modelicaPlatform());
3408- makefileStr := System . stringReplace(makefileStr, "@CPPFLAGS@" , "-DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 " + includeDefaultFmi);
3408+ makefileStr := System . stringReplace(makefileStr, "@CPPFLAGS@" , "-DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I " + includeDefaultFmi);
34093409 makefileStr := System . stringReplace(makefileStr, "@LIBTYPE_DYNAMIC@" , "1" );
34103410 makefileStr := System . stringReplace(makefileStr, "@BSTATIC@" , Autoconf . bstatic);
34113411 makefileStr := System . stringReplace(makefileStr, "@BDYNAMIC@" , Autoconf . bdynamic);
@@ -3416,7 +3416,7 @@ algorithm
34163416 then false ;
34173417 case {_}
34183418 algorithm
3419- cmd := "cd \" " + fmutmp + "/sources \" && ./configure --host=" + quote+ platform+ quote+ " CFLAGS=" + quote+ "-Os" + quote+ " CPPFLAGS=" + quote+ includeDefaultFmi+ quote+ " LDFLAGS= && " +
3419+ cmd := "cd \" " + fmutmp + "/sources \" && ./configure --host=" + quote+ platform+ quote+ " CFLAGS=" + quote+ "-Os" + quote+ " CPPFLAGS=" + quote+ "-I" + includeDefaultFmi+ quote+ " LDFLAGS= && " +
34203420 nozip;
34213421 if 0 <> System . systemCall(cmd, outFile= logfile) then
34223422 Error . addMessage(Error . SIMULATOR_BUILD_ERROR , {System . readFile(logfile)});
@@ -3427,12 +3427,12 @@ algorithm
34273427 case host::"docker" ::"run" ::rest
34283428 algorithm
34293429 uid := System . getuid();
3430- cmd := "docker run " + (if uid<> 0 then "--user " + String (uid) else "" )+ " --rm -w /fmu -v " + quote+ System . realpath(fmutmp+ "/.." )+ quote+ ":/fmu " + stringDelimitList(rest," " )+ " sh -c " + dquote +
3430+ cmd := "docker run " + (if uid<> 0 then "--user " + String (uid) else "" )+ " --rm -w /fmu -v " + quote+ System . realpath(fmutmp+ "/.." )+ quote+ ":/fmu -v " + quote + System . realpath(includeDefaultFmi) + quote + ":/fmiInclude " + stringDelimitList(rest," " )+ " sh -c " + dquote +
34313431 "cd " + dquote + System . basename(fmutmp) + "/sources" + dquote + " && " +
3432- "./configure --host=" + quote+ host+ quote+ " CFLAGS=" + quote+ "-Os" + quote+ " CPPFLAGS=" + quote + includeDefaultFmi + quote + " LDFLAGS= && " +
3432+ "./configure --host=" + quote+ host+ quote+ " CFLAGS=" + quote+ "-Os" + quote+ " CPPFLAGS=-I/fmiInclude LDFLAGS= && " +
34333433 nozip + dquote;
34343434 if 0 <> System . systemCall(cmd, outFile= logfile) then
3435- Error . addMessage(Error . SIMULATOR_BUILD_ERROR , {System . readFile(logfile)});
3435+ Error . addMessage(Error . SIMULATOR_BUILD_ERROR , {cmd + ": \n " + System . readFile(logfile)});
34363436 System . removeFile(dir + logfile);
34373437 fail();
34383438 end if ;
0 commit comments