From 849e7b5a5a2ac04c65aa8568567bc514f212bf94 Mon Sep 17 00:00:00 2001 From: Peter Donovan Date: Tue, 30 May 2023 11:52:58 -0700 Subject: [PATCH 1/2] Pass LOGGING debug option to federates. --- org.lflang/src/org/lflang/TargetConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.lflang/src/org/lflang/TargetConfig.java b/org.lflang/src/org/lflang/TargetConfig.java index c4794b4b1a..3535ae01a6 100644 --- a/org.lflang/src/org/lflang/TargetConfig.java +++ b/org.lflang/src/org/lflang/TargetConfig.java @@ -97,6 +97,7 @@ public TargetConfig(Properties cliArgs, TargetDecl target, ErrorReporter errorRe } if (cliArgs.containsKey("logging")) { this.logLevel = LogLevel.valueOf(cliArgs.getProperty("logging").toUpperCase()); + this.setByUser.add(TargetProperty.LOGGING); } if (cliArgs.containsKey("workers")) { this.workers = Integer.parseInt(cliArgs.getProperty("workers")); From bc564e25e8a8ea6b0d470a5de6df95e34e06ba5e Mon Sep 17 00:00:00 2001 From: Peter Donovan Date: Tue, 30 May 2023 11:58:37 -0700 Subject: [PATCH 2/2] Add setByUser for other cliArgs. --- org.lflang/src/org/lflang/TargetConfig.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/org.lflang/src/org/lflang/TargetConfig.java b/org.lflang/src/org/lflang/TargetConfig.java index 3535ae01a6..67175777b6 100644 --- a/org.lflang/src/org/lflang/TargetConfig.java +++ b/org.lflang/src/org/lflang/TargetConfig.java @@ -94,6 +94,7 @@ public TargetConfig(Properties cliArgs, TargetDecl target, ErrorReporter errorRe if (cliArgs.containsKey("build-type")) { this.cmakeBuildType = (BuildType) UnionType.BUILD_TYPE_UNION.forName(cliArgs.getProperty("build-type")); + this.setByUser.add(TargetProperty.BUILD_TYPE); } if (cliArgs.containsKey("logging")) { this.logLevel = LogLevel.valueOf(cliArgs.getProperty("logging").toUpperCase()); @@ -101,15 +102,19 @@ public TargetConfig(Properties cliArgs, TargetDecl target, ErrorReporter errorRe } if (cliArgs.containsKey("workers")) { this.workers = Integer.parseInt(cliArgs.getProperty("workers")); + this.setByUser.add(TargetProperty.WORKERS); } if (cliArgs.containsKey("threading")) { this.threading = Boolean.parseBoolean(cliArgs.getProperty("threading")); + this.setByUser.add(TargetProperty.THREADING); } if (cliArgs.containsKey("target-compiler")) { this.compiler = cliArgs.getProperty("target-compiler"); + this.setByUser.add(TargetProperty.COMPILER); } if (cliArgs.containsKey("tracing")) { this.tracing = new TracingOptions(); + this.setByUser.add(TargetProperty.TRACING); } if (cliArgs.containsKey("scheduler")) { this.schedulerType = SchedulerOption.valueOf(cliArgs.getProperty("scheduler")); @@ -120,19 +125,24 @@ public TargetConfig(Properties cliArgs, TargetDecl target, ErrorReporter errorRe if (!cliArgs.getProperty("target-flags").isEmpty()) { this.compilerFlags.addAll(List.of(cliArgs.getProperty("target-flags").split(" "))); } + this.setByUser.add(TargetProperty.FLAGS); } if (cliArgs.containsKey("runtime-version")) { this.runtimeVersion = cliArgs.getProperty("runtime-version"); + this.setByUser.add(TargetProperty.RUNTIME_VERSION); } if (cliArgs.containsKey("external-runtime-path")) { this.externalRuntimePath = cliArgs.getProperty("external-runtime-path"); + this.setByUser.add(TargetProperty.EXTERNAL_RUNTIME_PATH); } if (cliArgs.containsKey(TargetProperty.KEEPALIVE.description)) { this.keepalive = Boolean.parseBoolean(cliArgs.getProperty(TargetProperty.KEEPALIVE.description)); + this.setByUser.add(TargetProperty.KEEPALIVE); } if (cliArgs.containsKey(BuildParm.PRINT_STATISTICS.getKey())) { this.printStatistics = true; + this.setByUser.add(TargetProperty.PRINT_STATISTICS); } }