Changeset 13661


Ignore:
Timestamp:
Oct 3, 2019 3:22:35 PM (2 months ago)
Author:
randersson
Message:

#5792 Merged trunk to stable

Location:
branches/stable
Files:
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/stable

  • branches/stable/CHANGELOG.txt

    r13575 r13661  
    11================= Unreleased ==================
     2# Fixed ; Minor ; Compiler; #5844
     3Improved attribute evaluation robustness for some cases. Parametric
     4attributes are now only generated in model description for inputs
     5and states.
     6
    27# Fixed ; Minor ; Compiler; #5835
    38Format string argument to the String function is now useable.
  • branches/stable/Compiler/FmiXMLCodeGen/test/modelica/FmiXMLTests.mo

    r12934 r13661  
    25002500end Start5;
    25012501
     2502model ParametricAttributes1
     2503    parameter Real p = 1;
     2504    input Real x1(min=p, max=p, nominal=p);
     2505    Real x2(min=p, max=p, nominal=p);
     2506    output Real x3(min=p, max=p, nominal=p);
     2507equation
     2508    der(x2) = x1;
     2509    x3 = x2;
     2510
     2511    annotation(__JModelica(UnitTesting(tests={
     2512        FmiXMLCodeGenTestCase(
     2513            name="ParametricAttributes1",
     2514            description="",
     2515            fmi_version="2.0",
     2516            template="
     2517$modelVariables$
     2518",
     2519            generatedCode="
     2520<ModelVariables>
     2521    <!-- Variable with index #1 -->
     2522    <ScalarVariable name=\"p\" valueReference=\"0\" causality=\"parameter\" variability=\"fixed\" initial=\"exact\">
     2523        <Real relativeQuantity=\"false\" start=\"1.0\" />
     2524    </ScalarVariable>
     2525    <!-- Variable with index #2 -->
     2526    <ScalarVariable name=\"x1\" valueReference=\"3\" causality=\"input\" variability=\"continuous\">
     2527        <Real relativeQuantity=\"false\" min=\"1.0\" max=\"1.0\" nominal=\"1.0\" start=\"0.0\" />
     2528    </ScalarVariable>
     2529    <!-- Variable with index #3 -->
     2530    <ScalarVariable name=\"x2\" valueReference=\"2\" causality=\"local\" variability=\"continuous\" initial=\"calculated\">
     2531        <Real relativeQuantity=\"false\" min=\"1.0\" max=\"1.0\" nominal=\"1.0\" />
     2532    </ScalarVariable>
     2533    <!-- Variable with index #4 -->
     2534    <ScalarVariable name=\"der(x2)\" valueReference=\"1\" causality=\"local\" variability=\"continuous\" initial=\"calculated\">
     2535        <Real relativeQuantity=\"false\" derivative=\"3\" />
     2536    </ScalarVariable>
     2537    <!-- Variable with index #5 -->
     2538    <ScalarVariable name=\"x3\" valueReference=\"4\" causality=\"output\" variability=\"continuous\" initial=\"calculated\">
     2539        <Real relativeQuantity=\"false\" />
     2540    </ScalarVariable>
     2541</ModelVariables>
     2542")})));
     2543end ParametricAttributes1;
     2544
    25022545end FmiXMLTests;
  • branches/stable/Compiler/GenericCodeGen/src/jastadd/GenericXMLGenerator.jrag

    r11966 r13661  
    213213    protected void generateAttributeIfSet(String name, FVariable variable, CodeStream printer) {
    214214        if (variable.attributeSet(name)) {
    215             String value = variable.attributeCValue(name).xmlValue();
    216             generateAttribute(name, value, printer);
     215            FExp attributeExp = variable.attributeExp(name);
     216            if (attributeExp.variability().constantVariability() ||
     217                    variable.isInput() || variable.isDifferentiatedVariable()) {
     218                try {
     219                    String value = attributeExp.ceval().xmlValue();
     220                    generateAttribute(name, value, printer);
     221                } catch (ConstantEvaluationException e) {
     222                    throw new InternalCompilerError("Exception when generating xml attribute '" +
     223                        name + "' for variable '" + variable.name() + "'.", e);
     224                }
     225            }
    217226        }
    218227    }
  • branches/stable/Compiler/ModelicaCBackEnd/src/jastadd/CCodeGen/CCodeGenFunctionIO.jrag

    r11676 r13661  
    1616
    1717aspect CCodeGenFunctionIO {
    18    
    19     public class CPrettyPrinter {
    20         @Override
    21         public void printIODecl(FExp n, CodeStream str, String indent) {
    22             n.genTempInputDecl_C(this, str, indent);
    23         }
    24         @Override
    25         public void printIOPre(FExp n, CodeStream str, String indent) {
    26             n.genTempInputAssigns_C(this, str, indent);
    27         }
    28         @Override
    29         public void printIOExec(FExp n, CodeStream str, String indent) {
    30             n.genArgument(ExecStep, str, indent);
    31         }
    32     }
    3318   
    3419    syn boolean FAccessExp.alsoInRHS() {
  • branches/stable/Compiler/ModelicaCBackEnd/src/jastadd/CodeGen/StepPrinter.jrag

    r12024 r13661  
    140140   
    141141    public abstract class CodePrinter {
    142         public abstract void printIODecl(FExp n, CodeStream str, String indent);
    143         public abstract void printIOPre(FExp n, CodeStream str, String indent);
    144         public abstract void printIOExec(FExp n, CodeStream str, String indent);
     142        public void printIODecl(FExp n, CodeStream str, String indent) {
     143            n.genTempInputDecl_C(this, str, indent);
     144        }
     145        public void printIOPre(FExp n, CodeStream str, String indent) {
     146            n.genTempInputAssigns_C(this, str, indent);
     147        }
     148        public void printIOExec(FExp n, CodeStream str, String indent) {
     149            n.genArgument(ExecStep, str, indent);
     150        }
    145151    }
    146152   
  • branches/stable/Compiler/ModelicaFlatTree/src/jastadd/ConstantEvaluation/ConstantEvaluation.jrag

    r13575 r13661  
    49894989    public class VariableEvaluator {
    49904990        public static final VariableEvaluator instance = new VariableEvaluator(true);
    4991         private boolean externalEvaluationEnabled;
     4991        private final boolean externalEvaluationEnabled;
    49924992       
    49934993        public VariableEvaluator(boolean externalEvaluationEnabled) {
  • branches/stable/Compiler/ModelicaFlatTree/src/jastadd/FlatAPI/FlatAPI.jrag

    r13504 r13661  
    23682368    inh FClass FFunctionDecl.myFClass();
    23692369    inh FClass FRecordDecl.myFClass();
     2370    inh FClass FDerivedType.myFClass();
     2371    inh FClass FEnumDecl.myFClass();
    23702372    inh FClass FAlgorithm.myFClass();
    23712373    inh FClass FAbstractEquation.myFClass();
  • branches/stable/Compiler/ModelicaFlatTree/src/jastadd/FlatUtil.jrag

    r13504 r13661  
    16891689     
    16901690
    1691     public String FClass.nextTempFuncName() {
    1692         String name;
    1693         do {
    1694             name = "temp_" + nextTempFuncIndex++;
    1695         } while (lookupFunc(name) != null);
    1696         return name;
    1697     }
    1698     private int FClass.nextTempFuncIndex = 1;
    1699 
    1700 
    17011691    /**
    17021692     * Creates new temporary variables with the given name.
  • branches/stable/Compiler/ModelicaFlatTree/src/jastadd/PrettyPrint.jrag

    r13575 r13661  
    13271327
    13281328    public void FDerivedType.prettyPrint(Printer p, CodeStream str, String indent) {
     1329        prettyPrintWithName(p, str, indent, getName());
     1330    }
     1331   
     1332    private void FDerivedType.prettyPrintWithName(Printer p, CodeStream str, String indent, String name) {
    13291333        if (!getBaseType().isEnum()) {
    1330             str.print(indent, "type ", getName(), " = ", getBaseType());
     1334            str.print(indent, "type ", name, " = ", getBaseType());
    13311335            getFAttributeList().prettyPrintFAttributeList(str, p);
    13321336            str.println(";");
  • branches/stable/Compiler/ModelicaFlatTree/src/jastadd/ast/FlatModelica.ast

    r13357 r13661  
    699699 * LibTopPackagePath is the file path of the package file of the library that this external statement originated from.
    700700 */
    701 FExternalStmt : FStatement ::= FExternalLanguage [ReturnVar:CommonAccessExp] <Name> Arg:FExp* <LibTopPackagePath>;
     701FExternalStmt : FStatement ::= FExternalLanguage [ReturnVar:CommonAccessExp] <Name> Arg:FExp* <LibTopPackagePath> FAttribute*;
    702702
    703703/**
  • branches/stable/Compiler/ModelicaFrontEnd/src/jastadd/flattening/Flattening.jrag

    r13575 r13661  
    776776        stmt.setLibTopPackagePath(scd == null ? "" : scd.myLibRootPath().toAbsolutePath().toString()); // scd is null for builtins
    777777        stmt.setFExternalLanguage(hasFExternalLanguage() ?
    778                 (FExternalLanguage) getFExternalLanguage().fullCopy() :
     778                getFExternalLanguage().treeCopy() :
    779779                new FCExternalLanguage());
    780780        stmt.extractLibrary(this);
     
    830830                new Opt<CommonAccessExp>();
    831831               
    832         FExternalStmt stmt = new FExternalStmt(getFExternalLanguage().treeCopy(), ret, getName(), args, getLibTopPackagePath());
     832        FExternalStmt stmt = new FExternalStmt(getFExternalLanguage().treeCopy(), ret, getName(), args, getLibTopPackagePath(), new List<FAttribute>());
    833833        stmt.extractLibrary(this);
    834834        sl.add(stmt);
     
    33993399    /**
    34003400     * Class used during instantiation of equations and flattening of variables
    3401      * to delecate to different contributors. This class is subtyped for each
    3402      * contributor!
     3401     * to delegate to different contributors. This class is subtyped for each
     3402     * contributor.
    34033403     */
    34043404    public abstract class AttributeContributor {
  • branches/stable/Compiler/ModelicaFrontEnd/src/jastadd/instance/InstLookupComponents.jrag

    r13504 r13661  
    2727         */
    2828        public static <T extends Item> InstLookupResult<T> InstLookupResult.notFound() {
    29             return (InstLookupResult<T>) NOT_FOUND;
     29            return NOT_FOUND;
    3030        }
    3131
  • branches/stable/Compiler/ModelicaFrontEnd/src/jastadd/instance/InstanceTree.jrag

    r13575 r13661  
    18071807    }
    18081808    public List<InstComponentDecl> InstLibNode.getInstComponentDeclList() {
    1809         throw new UnsupportedOperationException();
     1809        return resolveLib().getInstComponentDeclList();
    18101810    }
    18111811
     
    18141814    }
    18151815    public List<InstClassDecl> InstLibNode.getInstClassDeclList() {
    1816         throw new UnsupportedOperationException();
     1816        return resolveLib().getInstClassDeclList();
    18171817    }
    18181818
     
    18211821    }
    18221822    public List<InstExtends> InstLibNode.getInstExtendsList() {
    1823         throw new UnsupportedOperationException();
     1823        return resolveLib().getInstExtendsList();
    18241824    }
    18251825
     
    18281828    }
    18291829    public List<InstImport> InstLibNode.getInstImportList() {
    1830         throw new UnsupportedOperationException();
     1830        return resolveLib().getInstImportList();
    18311831    }
    18321832
     
    18351835    }
    18361836    public List<InstClassDecl> InstLibNode.getRedeclaredInstClassDeclList() {
    1837         throw new UnsupportedOperationException();
     1837        return actualInstClass().getRedeclaredInstClassDeclList();
    18381838    }
    18391839
  • branches/stable/Compiler/ModelicaFrontEnd/src/jastadd/source/Library.jrag

    r13354 r13661  
    475475        // We should figure out if using a non-file name is really needed as load description,
    476476        // and if not - get rid of otherDesc.
    477         private Path path;
     477        private final Path path;
    478478        private final String otherDesc;
    479479
  • branches/stable/Compiler/ModelicaFrontEnd/src/jastadd/source/PredefinedTypes.jrag

    r12975 r13661  
    4141     * Some differences apply however. The types of predefined types must
    4242     * be looked up only amongst the built-in types. Also, there are no
    43      * component accesses that needs to be looked up predefined types.
     43     * component accesses that need to be looked up for predefined types.
    4444     * The predefined types are defined in the (list) non terminal attribute
    4545     * PredefinedType.
  • branches/stable/Compiler/ModelicaFrontEnd/src/jastadd/util/Annotations.jrag

    r13294 r13661  
    9191    public class FClass            implements FAttributeListAnnotationNode.FAttributeList {}
    9292    public class FAttribute        implements FAttributeListAnnotationNode.FAttributeList {}
     93    public class FExternalStmt     implements FAttributeListAnnotationNode.FAttributeList {}
    9394   
    9495    eq FFunctionDecl.annotation(InstContext instContext)     = new FAttributeListAnnotationNode(this, instContext);
     
    9697    eq FAbstractEquation.annotation(InstContext instContext) = new FAttributeListAnnotationNode(this, instContext);
    9798    eq FClass.annotation(InstContext instContext)            = new FAttributeListAnnotationNode(this, instContext);
     99    eq FExternalStmt.annotation(InstContext instContext)     = new FAttributeListAnnotationNode(this, instContext);
    98100
    99101    eq InstExternal.annotation() = annotation(annotationExpEvaluator());
     
    236238        myTargetInstClassDecl().addAnnotationToEvaluator(list, this);
    237239        return list;
     240    }
     241    eq InstLibNode.annotations() {
     242        return resolveLib().annotations();
    238243    }
    239244
  • branches/stable/Compiler/ModelicaMiddleEnd/src/jastadd/structural/Symbolic.jrag

    r13575 r13661  
    187187                    negatedFactor = true;
    188188                } else if (ee.nbrUses(var.name())==0) {
    189                     if (ee.variability().constantVariability() &&
    190                             Math.abs(ee.ceval().realValue()) *
    191                             ee.dynamicFExp(var.nominal()).ceval().realValue() < tol) {
     189                    if (!nominalAllowsDivision(ee, var, tol)) {
    192190                        return new FNoExp();
    193191                    }
     
    212210        }
    213211        return FExp.createBalancedBinaryTree(new FAddExp(), parts);
     212    }
     213   
     214    /**
     215     * Check if nominal values allow the variable to be divided by the factor.
     216     */
     217    private static Boolean FEquation.nominalAllowsDivision(FExp factor, FVariable var, double tol) {
     218        if (factor.variability().constantVariability()) {
     219            FExp nominal = factor.dynamicFExp(var.nominal());
     220            if (nominal.variability().constantVariability() &&
     221                    Math.abs(factor.ceval().realValue()) *
     222                    nominal.ceval().realValue() < tol) {
     223                return false;
     224            }
     225        }
     226        return true;
    214227    }
    215228   
  • branches/stable/Compiler/TestFramework/src/jastadd/TestAnnotationizer.jrag

    r13294 r13661  
    11791179            checkData(data);
    11801180            methodName = data[0].toString();
    1181             arguments = (data.length == 1) ? new Object[0] : (Object[]) data[1];
     1181            arguments = arguments();
    11821182            Method method = o.getClass().getMethod(methodName, TestCase.unwrapClasses(arguments));
    11831183            methodResult = method.invoke(o, arguments).toString();
     1184        }
     1185       
     1186        private Object[] arguments() {
     1187            if (data.length > 1) {
     1188                if (data[1] != null) {
     1189                    return (Object[]) data[1];
     1190                }
     1191            }
     1192            return new Object[0];
    11841193        }
    11851194       
  • branches/stable/Makefile.am

    r13396 r13661  
    6464    make -f Makefile install "SWIGCHECK_BUILD_DIR=$(SWIGCHECK_BUILD_DIR)" "CASADI_BUILD_DIR=$(CASADI_BUILD_DIR)" "IPOPT_HOME=$(IPOPT_HOME)"
    6565    mkdir -p $(DESTDIR)$(prefix)/Python/
    66     cp -r $(abs_builddir)/casadi_install/casadi $(DESTDIR)$(prefix)/Python/
     66    cp -r $(CASADI_PYTHON_INST_DIR)/casadi $(DESTDIR)$(prefix)/Python/
    6767    ## temp fix
    68     cp $(abs_builddir)/casadi_build/swig/casadi_core.py $(DESTDIR)$(prefix)/Python/casadi
     68    cp $(CASADI_BUILD_DIR)/swig/casadi_core.py $(DESTDIR)$(prefix)/Python/casadi
    6969endif
    7070if COMPILE_WITH_IPOPT64 
     
    7474    make -f Makefile install "SWIGCHECK_BUILD_DIR=$(SWIGCHECK_BUILD_DIR)" "CASADI_BUILD_DIR=$(CASADI_BUILD_DIR64)" "IPOPT_HOME=$(IPOPT64_HOME)"
    7575    mkdir -p $(DESTDIR)$(prefix)/Python/
    76     cp -r $(abs_builddir)/casadi_install64/casadi $(DESTDIR)$(prefix)/Python_64/
     76    cp -r $(CASADI_PYTHON_INST_DIR64)/casadi $(DESTDIR)$(prefix)/Python_64/
    7777    ## temp fix
    78     cp $(abs_builddir)/casadi_build64/swig/casadi_core.py $(DESTDIR)$(prefix)/Python_64/casadi
     78    cp $(CASADI_BUILD_DIR64)/swig/casadi_core.py $(DESTDIR)$(prefix)/Python_64/casadi
    7979    export PYTHONHOME=$(ORIG_PYTHON_HOME); \
    8080    export PATH="$(ORIG_PATH)";
     
    504504JAVA_OC_CASADI_ANT_FILE=$(COMPILER_DIR)/OptimicaCompilerCasADi/build.xml
    505505
    506 all-local: build-python-packages build-compiler
    507     $(abs_top_srcdir)/get_version.sh $(abs_top_srcdir) https://svn.jmodelica.org > $(abs_builddir)/version.txt
     506all-local: build-python-packages build-compiler $(abs_builddir)/version.txt build-extra
     507
     508$(abs_builddir)/version.txt: TODO-always-trigger
     509    $(abs_top_srcdir)/get_version.sh $(abs_top_srcdir) https://svn.jmodelica.org > $(@)
     510
     511build-extra: TODO-always-trigger
    508512    if [ "$(BUILD_EXTRA)" ]; then exec "$(BUILD_EXTRA)" "$(abs_top_srcdir)" "$(DESTDIR)$(prefix)"; fi
    509513
     
    578582ant_output_options=$(JAVA_BUILD_DIR)/src/build/DefaultOptions.xml
    579583
    580 install-compiler: $(ant_output_jars) $(ant_output_options) TODO-always-trigger
     584install-compiler: $(ant_output_jars) $(ant_output_options)
    581585if HAVE_ANT
    582586    mkdir -p $(DESTDIR)$(prefix)/lib/
     
    585589endif
    586590
    587 # Dummy target used to always trigger rebuilds. Used to enable references to
    588 # outputs from phony targets as real targets. For example ant output.
    589 TODO-always-trigger: ;
    590 
    591591$(ant_output_jars) $(ant_output_options): build-compiler
    592592
    593 build-compiler:
     593build-compiler: TODO-always-trigger
    594594if HAVE_ANT
    595595    mkdir -p $(JAVA_BUILD_DIR)
     
    599599    $(ANT_OPTS) $(ANT) -f "$(JAVA_OC_ANT_FILE)" "-Dcompiler=$(COMPILER_DIR)" "-Dtarget=$(JAVA_BUILD_DIR)"
    600600endif
     601
     602# Dummy target used to always trigger rebuilds. Used to enable references to
     603# outputs from phony targets as real targets. For example ant output.
     604TODO-always-trigger: ;
    601605
    602606install-modules: install-modules-ModelicaFrontEnd
  • branches/stable/Makefile.in

    r13396 r13661  
    879879@COMPILE_WITH_IPOPT_TRUE@   make -f Makefile install "SWIGCHECK_BUILD_DIR=$(SWIGCHECK_BUILD_DIR)" "CASADI_BUILD_DIR=$(CASADI_BUILD_DIR)" "IPOPT_HOME=$(IPOPT_HOME)"
    880880@COMPILE_WITH_IPOPT_TRUE@   mkdir -p $(DESTDIR)$(prefix)/Python/
    881 @COMPILE_WITH_IPOPT_TRUE@   cp -r $(abs_builddir)/casadi_install/casadi $(DESTDIR)$(prefix)/Python/
    882 @COMPILE_WITH_IPOPT_TRUE@   cp $(abs_builddir)/casadi_build/swig/casadi_core.py $(DESTDIR)$(prefix)/Python/casadi
     881@COMPILE_WITH_IPOPT_TRUE@   cp -r $(CASADI_PYTHON_INST_DIR)/casadi $(DESTDIR)$(prefix)/Python/
     882@COMPILE_WITH_IPOPT_TRUE@   cp $(CASADI_BUILD_DIR)/swig/casadi_core.py $(DESTDIR)$(prefix)/Python/casadi
    883883@COMPILE_WITH_IPOPT64_TRUE@ export PATH=$(PYTHON64_HOME):$(PYTHON64_HOME)/Scripts:$(PYTHON64_HOME)/Lib:"${PATH}"; \
    884884@COMPILE_WITH_IPOPT64_TRUE@ export PYTHONHOME=$(PYTHON64_HOME); 
     
    886886@COMPILE_WITH_IPOPT64_TRUE@ make -f Makefile install "SWIGCHECK_BUILD_DIR=$(SWIGCHECK_BUILD_DIR)" "CASADI_BUILD_DIR=$(CASADI_BUILD_DIR64)" "IPOPT_HOME=$(IPOPT64_HOME)"
    887887@COMPILE_WITH_IPOPT64_TRUE@ mkdir -p $(DESTDIR)$(prefix)/Python/
    888 @COMPILE_WITH_IPOPT64_TRUE@ cp -r $(abs_builddir)/casadi_install64/casadi $(DESTDIR)$(prefix)/Python_64/
    889 @COMPILE_WITH_IPOPT64_TRUE@ cp $(abs_builddir)/casadi_build64/swig/casadi_core.py $(DESTDIR)$(prefix)/Python_64/casadi
     888@COMPILE_WITH_IPOPT64_TRUE@ cp -r $(CASADI_PYTHON_INST_DIR64)/casadi $(DESTDIR)$(prefix)/Python_64/
     889@COMPILE_WITH_IPOPT64_TRUE@ cp $(CASADI_BUILD_DIR64)/swig/casadi_core.py $(DESTDIR)$(prefix)/Python_64/casadi
    890890@COMPILE_WITH_IPOPT64_TRUE@ export PYTHONHOME=$(ORIG_PYTHON_HOME); \
    891891@COMPILE_WITH_IPOPT64_TRUE@ export PATH="$(ORIG_PATH)";
     
    11931193@PYTHON_ENABLED_TRUE@   chmod ugo+x $(DESTDIR)$(prefix)/bin/jm_*.sh
    11941194
    1195 all-local: build-python-packages build-compiler
    1196     $(abs_top_srcdir)/get_version.sh $(abs_top_srcdir) https://svn.jmodelica.org > $(abs_builddir)/version.txt
     1195all-local: build-python-packages build-compiler $(abs_builddir)/version.txt build-extra
     1196
     1197$(abs_builddir)/version.txt: TODO-always-trigger
     1198    $(abs_top_srcdir)/get_version.sh $(abs_top_srcdir) https://svn.jmodelica.org > $(@)
     1199
     1200build-extra: TODO-always-trigger
    11971201    if [ "$(BUILD_EXTRA)" ]; then exec "$(BUILD_EXTRA)" "$(abs_top_srcdir)" "$(DESTDIR)$(prefix)"; fi
    11981202
     
    12571261    if [ "$(INSTALL_EXTRA)" ]; then exec "$(INSTALL_EXTRA)" "$(abs_top_srcdir)" "$(DESTDIR)$(prefix)"; fi
    12581262
    1259 install-compiler: $(ant_output_jars) $(ant_output_options) TODO-always-trigger
     1263install-compiler: $(ant_output_jars) $(ant_output_options)
    12601264@HAVE_ANT_TRUE@ mkdir -p $(DESTDIR)$(prefix)/lib/
    12611265@HAVE_ANT_TRUE@ install -t $(DESTDIR)$(prefix)/lib/ $(ant_output_jars)
    12621266@HAVE_ANT_TRUE@ install -t $(DESTDIR)$(prefix)/ $(ant_output_options)
    12631267
    1264 # Dummy target used to always trigger rebuilds. Used to enable references to
    1265 # outputs from phony targets as real targets. For example ant output.
    1266 TODO-always-trigger: ;
    1267 
    12681268$(ant_output_jars) $(ant_output_options): build-compiler
    12691269
    1270 build-compiler:
     1270build-compiler: TODO-always-trigger
    12711271@HAVE_ANT_TRUE@ mkdir -p $(JAVA_BUILD_DIR)
    12721272@HAVE_ANT_TRUE@ cd $(JAVA_BUILD_DIR); \
     
    12741274@HAVE_ANT_TRUE@ cd $(JAVA_BUILD_DIR); \
    12751275@HAVE_ANT_TRUE@ $(ANT_OPTS) $(ANT) -f "$(JAVA_OC_ANT_FILE)" "-Dcompiler=$(COMPILER_DIR)" "-Dtarget=$(JAVA_BUILD_DIR)"
     1276
     1277# Dummy target used to always trigger rebuilds. Used to enable references to
     1278# outputs from phony targets as real targets. For example ant output.
     1279TODO-always-trigger: ;
    12761280
    12771281install-modules: install-modules-ModelicaFrontEnd
  • branches/stable/Python/src/pymodelica/compiler_wrappers.py

    r12127 r13661  
    322322        if isinstance(platforms, basestring):
    323323            platforms = [platforms]
    324         self._compiler.targetPlatforms = platforms
     324        self._compiler.setTargetPlatforms(platforms)
    325325       
    326326    def compile_Unit(self, class_name, file_name, target, version, compile_to):
Note: See TracChangeset for help on using the changeset viewer.