CMakePP / CMakePPLang

Object-oriented extension to the CMake language.
http://cmakepp.github.io/CMakePPLang/
Apache License 2.0
11 stars 4 forks source link

Updates cpp_contains to work with arbitrary types #133

Closed ryanmrichard closed 8 months ago

ryanmrichard commented 8 months ago

Is this pull request associated with an issue(s)? No

Description cpp_contains dispatches on the type of container it is searching. Before this PR it failed silently if the container was recognized as a type other than desc (a single element list), list, or map. This PR now adds an "else" clause which triggers when the type is anything other than map or desc (notably list is addressed by the else clause).

TODOs Longer term the fact that there is an ambiguity between wanting cpp_contains to look for a substring and comparing against a single element list is perhaps looking for trouble. Bluntly, I suggest deprecating this function as it doesn't save that many keystrokes and it's likely to cause problems.

github-actions[bot] commented 8 months ago

🚀 [bumpr] Bumped! New version:v1.0.7 Changes:v1.0.6...v1.0.7