Skip to content

Conversation

@kmorel
Copy link
Contributor

@kmorel kmorel commented Nov 11, 2025

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.

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.
@kmorel
Copy link
Contributor Author

kmorel commented Nov 11, 2025

@JieyangChen7 I got some nasty compile errors when trying to compile MGARD recently. There must have been some subtle changes with how CMake's configure_file command works.

These changes fix the problem. This may be worthy of patch releases.

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.

1 participant