mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[SCons] Enable clib_experimental flag
Also, add README.md for clib_experimental interface
This commit is contained in:
parent
e647b9de63
commit
2a432397f4
11
SConstruct
11
SConstruct
@ -134,6 +134,10 @@ if "clean" in COMMAND_LINE_TARGETS:
|
|||||||
remove_file(name)
|
remove_file(name)
|
||||||
for name in Path("site_scons").glob("**/*.pyc"):
|
for name in Path("site_scons").glob("**/*.pyc"):
|
||||||
remove_file(name)
|
remove_file(name)
|
||||||
|
for name in Path("include/cantera/clib_experimental").glob("*.h"):
|
||||||
|
remove_file(name)
|
||||||
|
for name in Path("src/clib_experimental").glob("*.cpp"):
|
||||||
|
remove_file(name)
|
||||||
|
|
||||||
logger.status("Done removing output files.", print_level=False)
|
logger.status("Done removing output files.", print_level=False)
|
||||||
|
|
||||||
@ -364,6 +368,13 @@ config_options = [
|
|||||||
"sphinx_docs",
|
"sphinx_docs",
|
||||||
"Build HTML documentation for Cantera using Sphinx.",
|
"Build HTML documentation for Cantera using Sphinx.",
|
||||||
False),
|
False),
|
||||||
|
BoolOption(
|
||||||
|
"clib_experimental",
|
||||||
|
"""Build experimental CLib. Requires running 'scons doxygen' and CLib code
|
||||||
|
generation via 'python3 interfaces/sourcegen/run.py --api=clib --output=.'
|
||||||
|
prior to 'scons build' command.
|
||||||
|
""",
|
||||||
|
False),
|
||||||
BoolOption(
|
BoolOption(
|
||||||
"run_examples",
|
"run_examples",
|
||||||
"""Run examples to generate plots and outputs for Sphinx Gallery. Disable to
|
"""Run examples to generate plots and outputs for Sphinx Gallery. Disable to
|
||||||
|
1
include/cantera/clib_experimental/.gitignore
vendored
Normal file
1
include/cantera/clib_experimental/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.h
|
25
include/cantera/clib_experimental/README.md
Normal file
25
include/cantera/clib_experimental/README.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Cantera – Experimental CLib Interface
|
||||||
|
|
||||||
|
This directory and the associated `src/clib_experimental` folder contain an
|
||||||
|
experimental re-implementation of Cantera's traditional CLib interface.
|
||||||
|
|
||||||
|
## Code Generation
|
||||||
|
|
||||||
|
Run the following command from the Cantera root folder:
|
||||||
|
|
||||||
|
```
|
||||||
|
scons doxygen
|
||||||
|
python3 interfaces/sourcegen/run.py --api=clib --output=.
|
||||||
|
scons build clib_experimental=y
|
||||||
|
```
|
||||||
|
|
||||||
|
A rudimentary test suite ensures that code performs as expected:
|
||||||
|
|
||||||
|
```
|
||||||
|
scons test-clib-experimental
|
||||||
|
```
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
The experimental CLib Interface is in preview and still missing many features
|
||||||
|
needed for parity with the traditional CLib interface.
|
@ -39,6 +39,8 @@ libs = [('base', ['cpp'], baseSetup),
|
|||||||
('zeroD', ['cpp'], defaultSetup),
|
('zeroD', ['cpp'], defaultSetup),
|
||||||
('clib', ['cpp'], defaultSetup),
|
('clib', ['cpp'], defaultSetup),
|
||||||
]
|
]
|
||||||
|
if env['clib_experimental']:
|
||||||
|
libs.append(('clib_experimental', ['cpp'], defaultSetup))
|
||||||
|
|
||||||
localenv = env.Clone()
|
localenv = env.Clone()
|
||||||
localenv.Prepend(CPPPATH=[Dir('#include'), Dir('.')])
|
localenv.Prepend(CPPPATH=[Dir('#include'), Dir('.')])
|
||||||
|
1
src/clib_experimental/.gitignore
vendored
Normal file
1
src/clib_experimental/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.cpp
|
Loading…
Reference in New Issue
Block a user