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

Fix build error "macro names must be identifiers" #962

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

JoelEinbinder
Copy link
Contributor

I was trying to compile xtb and it was failing with

Error: macro names must be identifiers

I traced it back to this line where an extra -D was being applied to these flags. Maybe this works as is with a different version of cmake? Happy to close this PR if everything is working as intended. But it compiled successfully for me after applying this patch.

cmake=3.22.1
gfortran=11.4.0
gcc=11.4.0
ubuntu=22.04

Signed-off-by: Joel Einbinder <joel.einbinder@gmail.com>
Copy link
Member

@awvwgk awvwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I suppose that way of defining macros used to work in CMake, however not anymore.

@MtoLStoN
Copy link
Member

Thanks for contributing!

@MtoLStoN MtoLStoN merged commit a25545c into grimme-lab:main Feb 16, 2024
11 checks passed
gorges97 pushed a commit to gorges97/xtb that referenced this pull request Mar 27, 2024
Signed-off-by: Joel Einbinder <joel.einbinder@gmail.com>
Signed-off-by: Johannes Gorges <58849467+gorges97@users.noreply.github.com>
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.

None yet

3 participants