Skip to content

CMAKE: Remove CPACK_BUILD_CONFIG from package name#537

Open
LegalizeAdulthood wants to merge 1 commit intoopen-simh:masterfrom
LegalizeAdulthood:legalize-CPACK_BUILD_CONFIG
Open

CMAKE: Remove CPACK_BUILD_CONFIG from package name#537
LegalizeAdulthood wants to merge 1 commit intoopen-simh:masterfrom
LegalizeAdulthood:legalize-CPACK_BUILD_CONFIG

Conversation

@LegalizeAdulthood
Copy link
Copy Markdown
Contributor

This isn't a predefined CMake or CPack variabe and isn't set anywhere in the CMake scripts.

@LegalizeAdulthood LegalizeAdulthood force-pushed the legalize-CPACK_BUILD_CONFIG branch from 350b765 to d4c472e Compare April 15, 2026 22:57
@pmetzger
Copy link
Copy Markdown

Committed on my ZIMH hard fork in pmetzger/zimh@fd0fc004

@LegalizeAdulthood
Copy link
Copy Markdown
Contributor Author

Apparently this is undocumented as mentioned here, but if you specify -C to inform CPack of a configuration, then this variable will be set to that. So theoretically, there could be a Debug package and a Release package.

So perhaps a "better" change would be to only append the value of this variable to the list if it is non-empty.

When I was building packages, because I didn't run CPack manually with -C, the variable was empty and I got a package name with an extra - in it.

@LegalizeAdulthood
Copy link
Copy Markdown
Contributor Author

I'll update my PR to append the variable only if non-empty.

@pmetzger
Copy link
Copy Markdown

I dunno. I think it's not a great idea to rely on undocumented CPack behavior? Makes me pretty uncomfortable.

@LegalizeAdulthood
Copy link
Copy Markdown
Contributor Author

Since I didn't contribute the entirety of the CMake build scripts, I'm trying to make changes consistent with the original intent.

@LegalizeAdulthood LegalizeAdulthood force-pushed the legalize-CPACK_BUILD_CONFIG branch 2 times, most recently from 2ca5d42 to 6853cac Compare May 3, 2026 00:04
This is an undocumented variable that will hold the build configuration,
e.g. Debug, Release, etc., used to create a package with CPack.  It is
only set if you provide an explicit configuration argument to CPack.
@LegalizeAdulthood LegalizeAdulthood force-pushed the legalize-CPACK_BUILD_CONFIG branch from 6853cac to d927e2b Compare May 4, 2026 14:49
@LegalizeAdulthood LegalizeAdulthood changed the title Remove CPACK_BUILD_CONFIG from package name CMAKE: Remove CPACK_BUILD_CONFIG from package name May 5, 2026
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