Fix defines created by CMake configure_file#251
Merged
JieyangChen7 merged 1 commit intoCODARcode:masterfrom Jan 2, 2026
Merged
Fix defines created by CMake configure_file#251JieyangChen7 merged 1 commit intoCODARcode:masterfrom
JieyangChen7 merged 1 commit intoCODARcode:masterfrom
Conversation
Recent versions of CMake must have changed how variables created from `option` commands were substituted in the `configure_file` command. Previously, they substituted to `ON` or `OFF`, but now they substitute for `TRUE` or `FALSE`. This causes a problem with how MGARDXConfig.h matched strings to set the `MGARD_ENABLE_X` macros. This change replaces string substitution with `#cmakedefine01`, which will simply replace the statement with a `#define` setting the variable to either 0 or 1, which is the desired outcome.
Contributor
Author
|
@JieyangChen7 I got some nasty compile errors when trying to compile MGARD recently. There must have been some subtle changes with how CMake's These changes fix the problem. This may be worthy of patch releases. |
Contributor
Author
|
@JieyangChen7 ping |
Collaborator
|
@kmorel Sorry about the delay. It is merged now. Thanks for fixing the issue. |
Contributor
Author
|
Excellent. Thanks. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Recent versions of CMake must have changed how variables created from
optioncommands were substituted in theconfigure_filecommand. Previously, they substituted toONorOFF, but now they substitute forTRUEorFALSE. This causes a problem with how MGARDXConfig.h matched strings to set theMGARD_ENABLE_Xmacros.This change replaces string substitution with
#cmakedefine01, which will simply replace the statement with a#definesetting the variable to either 0 or 1, which is the desired outcome.