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 FindLibxc.cmake to use /usr/include as include directory #3771

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

yizeyi18
Copy link

pkg-config would ignore flags like -I/usr/include in cflags; as ${prefix}_INCLUDE_DIRS is initialized from pkg-config --cflags-only-I ${pkgname}, it would be empty as only -I/usr/include in cflags. However, under this situation, cmake would still mark ${prefix}_FOUND as true, and without these global-visible includes no compilation issues arise; thus, this commit turns off detect of Libxc_INCLUDE_DIRS, and use Libxc_found instead.

Reminder

  • Have you linked an issue with this pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Fix #3761

What's changed?

  • Changed filter condition of find_package_handle_standard_args in cmake/FindLibxc.cmake.

Any changes of core modules? (ignore if not applicable)

No.

pkg-config would ignore flags like '-I/usr/include' in cflags; as ${prefix}_INCLUDE_DIRS is initialized from `pkg-config --cflags-only-I ${pkgname}`, it would be empty as only -I/usr/include in cflags. However, under this situation, cmake would still mark ${prefix}_FOUND as true, and without these global-visible includes no compilation issues arise; thus, this commit turns off detect of Libxc_INCLUDE_DIRS, and use Libxc_found instead.
@jinzx10 jinzx10 mentioned this pull request Mar 22, 2024
10 tasks
@caic99 caic99 merged commit 2cc4cf8 into deepmodeling:develop Mar 23, 2024
12 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.

Fails to find Libxc
2 participants