Skip to content

Show correct libxc details when showing the cmake summary#90

Open
hservatg wants to merge 2 commits into
abinit:masterfrom
hservatg:hservatg/fix/CMakeSummaryLibXCdetails
Open

Show correct libxc details when showing the cmake summary#90
hservatg wants to merge 2 commits into
abinit:masterfrom
hservatg:hservatg/fix/CMakeSummaryLibXCdetails

Conversation

@hservatg

@hservatg hservatg commented Sep 8, 2025

Copy link
Copy Markdown

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

pkestene commented Sep 8, 2025

Copy link
Copy Markdown
Contributor

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

hservatg commented Sep 8, 2025

Copy link
Copy Markdown
Author

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
Copy Markdown
Author

@pkestene -- thoughts on this PR?

@pkestene

Copy link
Copy Markdown
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