Skip to content

Commit

Permalink
Only create cakernel.cc if CaKernel is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
barrywardell committed Feb 9, 2012
1 parent a537129 commit 8c03fa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Tools/CodeGen/KrancThorn.m
Expand Up @@ -246,7 +246,10 @@ Thorn generation (main entry point for non-tensorial thorns)
(* Construct the cakernel file *)
If[OptionValue[UseCaKernel],
InfoMessage[Terse, "Creating CaKernel file"];
cakernel = CaKernelCCL[calcs]];
cakernel = CaKernelCCL[calcs];
,
cakernel = None;
];

boundarySources = CactusBoundary`GetSources[evolvedGroups, groups,
implementation, thornName];
Expand Down
4 changes: 3 additions & 1 deletion Tools/CodeGen/Thorn.m
Expand Up @@ -1409,7 +1409,9 @@
GenerateFile[thornDirectory <> "/interface.ccl", lookup[thorn, Interface]];
GenerateFile[thornDirectory <> "/param.ccl", lookup[thorn, Param]];
GenerateFile[thornDirectory <> "/schedule.ccl", lookup[thorn, Schedule]];
GenerateFile[thornDirectory <> "/cakernel.ccl", lookup[thorn, CaKernel]];
If[lookup[thorn, CaKernel] != None,
GenerateFile[thornDirectory <> "/cakernel.ccl", lookup[thorn, CaKernel]];
];

Map[GenerateFile[sourceDirectory <> "/" <> lookup[#, Filename],
lookup[#, Contents]] &,
Expand Down

0 comments on commit 8c03fa5

Please sign in to comment.