Skip to content

Commit 7e6f180

Browse files
author
Zanthoxylum
committed
Fix: compile reciprocal_grid.cpp in deepks unit tests
The ReciprocalGrid refactor made K_Vectors derive from ModuleCell::ReciprocalGrid, so klist.cpp.o and k_vector_utils.cpp.o now reference ReciprocalGrid member functions and its vtable. The deepks_unit_support object library (DEEPKS_UNIT_COMMON_SOURCES, gated behind ENABLE_MLALGO and thus only compiled in the gnu Test CI job) compiles klist.cpp without reciprocal_grid.cpp, failing to link all 30 MODULE_LCAO_DEEPKS_* test executables with undefined references to ModuleCell::ReciprocalGrid::renew/Monkhorst_Pack/build_star_ops/... and its vtable/typeinfo. Add the missing translation unit to the common source set; the symmetry library (incl. little_group.cpp) is already on the link line.
1 parent a321bf1 commit 7e6f180

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

source/source_lcao/module_deepks/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ set(DEEPKS_UNIT_COMMON_SOURCES
2828
../../../source_cell/klist.cpp
2929
../../../source_cell/parallel_kpoints.cpp
3030
../../../source_cell/k_vector_utils.cpp
31+
../../../source_cell/reciprocal_grid.cpp
3132
../../setup_nonlocal.cpp
3233
../../../source_cell/pseudo.cpp
3334
../../../source_cell/read_pp.cpp

0 commit comments

Comments
 (0)