Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to give template variables in json file (e.g. for units classes, ...) #1157

Closed
Tracked by #1038
Arthoni opened this issue Sep 19, 2023 · 3 comments
Closed
Tracked by #1038
Assignees

Comments

@Arthoni
Copy link
Member

Arthoni commented Sep 19, 2023

No description provided.

@Arthoni
Copy link
Member Author

Arthoni commented Sep 19, 2023

Currently as precompilation variable:

  • simulator id
  • units class

Known related simulators : ~6

@Arthoni Arthoni self-assigned this Oct 11, 2023
Arthoni added a commit to Arthoni/openfluid that referenced this issue Oct 26, 2023
Arthoni added a commit to Arthoni/openfluid that referenced this issue Oct 27, 2023
* added cmakelists parameter CONFIGURED_SIGNATURE
* added template variables in signature and documentation at configuration step
* changed tolerated characters for template case

(references OpenFLUID#1157)
Arthoni added a commit to Arthoni/openfluid that referenced this issue Nov 2, 2023
* added cmakelists parameter CONFIGURED_SIGNATURE
* added template variables in signature and documentation at configuration step
* changed tolerated characters for template case

(references OpenFLUID#1157)
Arthoni added a commit that referenced this issue Nov 9, 2023
* added cmakelists parameter CONFIGURED_SIGNATURE
* added template variables in signature and documentation at configuration step
* changed tolerated characters for template case

(references #1157)
@Arthoni
Copy link
Member Author

Arthoni commented Nov 9, 2023

Implemented a functional version with @ as template symbol

@Arthoni Arthoni closed this as completed Nov 9, 2023
@Arthoni Arthoni mentioned this issue Apr 8, 2024
8 tasks
@Arthoni
Copy link
Member Author

Arthoni commented May 2, 2024

Parametric signature usage

In openfluid-wareinfo.json

Variable should be surrounded by '@'

Example: water.surf-@foo@

In cmake

Affect a value to your variable in the main CMakeLists.txt

Example: SET(foo "SU")

Uncomment CONFIGURED_SIGNATURE ON in the CMakeLists.txt of src

In doc

Patterns in README and README.md in root dir of the ware will also be converted

Example:

# water.runoff.@foo@


Effect on @foo@ will...

In sources

(not affected by the parametric signature change)

Variable can be transmitted to cpp as precompilation variable by adding a definition in the CMakeLists.txt

Example: ADD_DEFINITIONS(-DISFOO=1)

Afterwards the precompilation variable ISFOO will be found in cpp code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant