From 01478e8bf1bc509f67a3f8fa2c18021dc9b975f3 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Thu, 12 Sep 2013 12:36:11 +0200 Subject: KrancThorn.m: Accumulate parameter check source in sources variable --- Tools/CodeGen/KrancThorn.m | 15 ++++++++++----- 1 file 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 @@ -327,6 +327,15 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ thornName, implementation, 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]]; -- cgit v1.2.3