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

CMake: Use list(APPEND FOO) over set(FOO ${FOO} ...) #2056

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Feb 12, 2025

set(FOO ${FOO} BAR BAZ)
set(FOO "${FOO};BAR;BAZ")

# They're both just funny ways to spell...
list(APPEND FOO BAR BAZ)

This PR replaces all remaining cargo-culted occurrences of set() being used to extend a list variable in CMake code, for which list(APPEND) is the appropriate command.

Not touched are calls like:

set(FOO_STRING "${FOO_STRING} extended-string-stuff")

...which are not list(APPEND) equivalent.

@kontura kontura self-assigned this Feb 17, 2025
@kontura
Copy link
Contributor

kontura commented Feb 17, 2025

Thanks

@kontura kontura added this pull request to the merge queue Feb 17, 2025
Merged via the queue into rpm-software-management:main with commit 84f9a6c Feb 17, 2025
21 checks passed
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

Successfully merging this pull request may close these issues.

2 participants