Skip to content

Fix elecstate energy unit test link dependencies#2

Merged
kluonju merged 1 commit into
developfrom
codex/fix-undefined-reference-errors-in-elecstate_energy
May 18, 2026
Merged

Fix elecstate energy unit test link dependencies#2
kluonju merged 1 commit into
developfrom
codex/fix-undefined-reference-errors-in-elecstate_energy

Conversation

@kluonju
Copy link
Copy Markdown
Owner

@kluonju kluonju commented May 18, 2026

Motivation

  • Resolve link-time undefined references for elecstate::H_Hartree_pw::v_hartree and elecstate::makov_payne_correction when building the MODULE_ESTATE_elecstate_energy unit test by ensuring the test links the planewave implementation and compiles the provider sources.

Description

  • Update source/source_estate/test/CMakeLists.txt to add planewave_serial to the LIBS for MODULE_ESTATE_elecstate_energy and to include ../makov_payne.cpp and ../module_pot/H_Hartree_pw.cpp in the test SOURCES so the missing symbols are defined at link time.

Testing

  • Ran git diff --check, which passed; attempted to configure the test build with cmake -DBUILD_TESTING=ON -DENABLE_MPI=ON but configuration failed due to missing MPI; a second cmake attempt with -DENABLE_MPI=OFF failed due to missing FFTW3, so a full build/test could not be completed in this environment.

Codex Task

@kluonju kluonju merged commit 7d389e2 into develop May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant