aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2013-09-12 12:36:11 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2013-09-12 12:36:11 +0200
commit01478e8bf1bc509f67a3f8fa2c18021dc9b975f3 (patch)
tree519d8a49edc3e4dc91cf335220a4f8023fa5b41e
parent35671680e303c54ac1d045e4f1554c69d7bec5dc (diff)
KrancThorn.m: Accumulate parameter check source in sources variable
-rw-r--r--Tools/CodeGen/KrancThorn.m15
1 files changed, 10 insertions, 5 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m
index cdb2cf3..5678410 100644
--- a/Tools/CodeGen/KrancThorn.m
+++ b/Tools/CodeGen/KrancThorn.m
@@ -328,6 +328,15 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[
allGFs, reflectionSymmetries, False]}]];
(* ------------------------------------------------------------------------
+ Add parameter check source file
+ ------------------------------------------------------------------------ *)
+
+ If[Length[OptionValue[ParameterConditions]] > 0,
+ AppendTo[sources,
+ {Filename -> "ParamCheck.cc",
+ Contents -> ParameterCheckSource[thornName, OptionValue[ParameterConditions]]}]];
+
+ (* ------------------------------------------------------------------------
Create finite differencing header file
------------------------------------------------------------------------ *)
@@ -398,11 +407,7 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[
Param -> param,
CaKernel -> cakernel,
Makefile -> make,
- Sources -> Join[sources,
- If[Length[OptionValue[ParameterConditions]] > 0,
- {{Filename -> "ParamCheck.cc",
- Contents -> ParameterCheckSource[thornName, OptionValue[ParameterConditions]]}},
- {}]]};
+ Sources -> sources};
InfoMessage[Terse, "Creating thorn"];
CreateThorn[thornspec]];