-
Notifications
You must be signed in to change notification settings - Fork 572
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
Teuchos: Add optional yaml-cpp parser #12599
Merged
rppawlo
merged 7 commits into
trilinos:develop
from
NexGenAnalytics:teuchos-add-yamlcpp-parser
Jan 22, 2024
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5eb03a9
add optional yaml-cpp parser and flag
cwschilly eb76740
Teuchos: move yaml-cpp dependency to TeuchosParameterList and refine …
cwschilly a125832
Teuchos: remove leftover debugging statement
cwschilly 3490517
Teuchos: support long long parsing and read in null nodes as empty su…
cwschilly 60b9c7d
Teuchos: allow for strings ending in ll or LL
cwschilly 9eddcb7
Teuchos: improve support for long long, add yes/no functionality for …
cwschilly 492d668
Teuchos: improve support for bool parsing
cwschilly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES( | ||
LIB_OPTIONAL_PACKAGES Kokkos | ||
LIB_OPTIONAL_TPLS BinUtils Boost MPI ARPREC QD QT quadmath yaml-cpp Pthread Valgrind | ||
LIB_OPTIONAL_TPLS BinUtils Boost MPI ARPREC QD QT quadmath Pthread Valgrind | ||
) | ||
|
||
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(Kokkos) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES( | ||
LIB_REQUIRED_PACKAGES TeuchosCore TeuchosParser | ||
LIB_OPTIONAL_TPLS yaml-cpp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
) |
6 changes: 6 additions & 0 deletions
6
packages/teuchos/parameterlist/cmake/TeuchosParameterList_config.h.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef TEUCHOSPARAMETERLIST_CONFIG_H | ||
#define TEUCHOSPARAMETERLIST_CONFIG_H | ||
|
||
#cmakedefine HAVE_TEUCHOSPARAMETERLIST_YAMLCPP | ||
|
||
#endif // TEUCHOSPARAMETERLIST_CONFIG_H | ||
Comment on lines
+1
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is okay, but unfortunate, that the name of this macro
HAVE_TEUCHOSPARAMETERLIST_YAMLCPP
does not exactly match name name of the automatically TriBITS-generated macroHAVE_TEUCHOSPARAMETERLIST_YAML-CPP
as described in here and here. The problem is that the char-
is not valid in a C/C++ macro name (see here). The char-
is the minus sign in C/C++.I wish someone had named this TPL
yamcpp
or evenYamlCpp
instead ofyaml-cpp
. Then a statement like this and a new variable this would not have been necessary.But I will note that
yaml-cpp
is the only external package/TPL defined in the file Trilinos/TPLsList.cmake and the only internal package defined in the file Trilinos/PackagesList.cmake (or all of the subpackage names in theDependencies.cmake
files) that uses-
in the name.One option is for TriBITS to automatically adjust package names that have
-
inside of them to instead use_
when creating thisHAVE_<PACKAGE_NAME_UC>_<UPSTREAM_PACKAGE_NAME_UC>
macro name which isa valid C/C++ macro name. But that adds more complexity to TriBITS and would break backward compatibility (but only in this one case for
yaml-cpp
?) Another option is to update TriBITS to assert that all external and internal package names to match the regex[a-zA-Z][a-zA-Z0-9_]+
which is required for all C/C++ identifiers.Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My suggestion would be to do the right long term thing which I think would be to rename the tpl to "yamlcpp". The TPL has very little use after removal from the plist years ago. The only actual use is for three snapshotted packages - kokkos-kernels, percept and krino. KK uses it for performance testing while percept and krino have it listed as an optional LIB dependence. It probably would not be that disruptive of a change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically isn't this similar to superlu_dist? And there we (maybe everybody?) just dropped the underscore as Roger suggests, so I'd be in that boat too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the idea of renaming the library. I suggest that be done in a subsequent PR.