+
Skip to content

Conversation

hservatg
Copy link

@hservatg hservatg commented Sep 8, 2025

Hello,

this tiny patch shows correct details for libxc when using cmake. Previously, I got

-- Libxc found:
--   > Libxc dir          :
--   > Libxc version      :
--   > Libxc headers      :
--   > Libxc libraries    :

With the patch, I get

-- Libxc found:
--   > Libxc dir          : /scratch/users/hservatg/ABINIT.ifx/libxc-7.0.0/build/install
--   > Libxc version      : 7.0.0
--   > Libxc cflags       : -I/scratch/users/hservatg/ABINIT.ifx/libxc-7.0.0/build/install/include/
--   > Libxc ldflags      : -L/scratch/users/hservatg/ABINIT.ifx/libxc-7.0.0/build/install/lib;-lxc

Thanks

@pkestene
Copy link
Contributor

pkestene commented Sep 8, 2025

Hi @hservatg

actually, correct details depend on how libxc is found on a given system:

  • if libxc is found via pkg_check_modules then yes your modifications are ok
  • if libxc is found via cmake find_package then the old message printing is ok

I would advise adding a cmake variable named Libxc_FOUND_via_pkgmodule defaulted to false, but set to TRUE when pkg_check_modules is successful so that you can distinguish the two different situations.

See https://github.com/abinit/abinit/blob/master/CMakeLists.txt#L489 where libxc is probed.

@hservatg
Copy link
Author

hservatg commented Sep 8, 2025

Ah, that aligns with my cmake configuration command, @pkestene .

Let me extend the patch with your suggestion.

@hservatg hservatg marked this pull request as draft September 8, 2025 15:29
@hservatg hservatg marked this pull request as ready for review September 8, 2025 20:50
@hservatg
Copy link
Author

@pkestene -- thoughts on this PR?

@pkestene
Copy link
Contributor

hi @mtorrent would-you mind looking into this ?

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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载