STYLE: use dynamicCode/ instead of codeStream/ for dynamically generated code

This commit is contained in:
Mark Olesen
2011-02-24 13:21:39 +01:00
parent 4aafea74a9
commit 51399bbbd1
10 changed files with 26 additions and 23 deletions

View File

@ -1,6 +1,6 @@
# -*- mode: org; -*-
#
#+TITLE: =codeStream=: On-the-fly code compilation
#+TITLE: =dynamicCode=: Dynamic code compilation
#+AUTHOR: OpenCFD Ltd.
#+DATE: TBA
#+LINK: http://www.openfoam.com
@ -47,12 +47,13 @@
=code=, =codeInclude=, =codeOptions= sections (these are just strings) and
calculates the SHA1 checksum of the contents.
- it copies a template file
=($FOAM_CODESTREAM_TEMPLATES/codeStreamTemplate.C)=, substituting all
=(~OpenFOAM/codeTemplates/dynamicCode/codeStreamTemplate.C)= or
=($FOAM_CODE_TEMPLATES/codeStreamTemplate.C)=, substituting all
occurences of =code=, =codeInclude=, =codeOptions=.
- it writes library source files to =codeStream/<SHA1>= and compiles
- it writes library source files to =dynamicCode/<SHA1>= and compiles
it using =wmake libso=.
- the resulting library is generated under
=codeStream/platforms/$WM_OPTIONS/lib= and is loaded (=dlopen=, =dlsym=)
=dynamicCode/platforms/$WM_OPTIONS/lib= and is loaded (=dlopen=, =dlsym=)
and the function executed
- the function will have written its output into the Ostream which then gets
used to construct the entry to replace the whole =#codeStream= section.