Commit 36fa6a1
authored
CMake: Centralize target linkage in source/CMakeLists.txt (#7584)
* CMake: Centralize target linkage in source/CMakeLists.txt
This refactors the CMake layout so that the top-level CMakeLists.txt is limited
to project configuration: options, feature resolution, platform/compiler setup,
and package discovery.
Target construction and linkage are centralized in source/CMakeLists.txt, which
now owns:
- the common linear-algebra dependency interface;
- optional external feature dependencies;
- the final external link closure;
- the ABACUS executable and its ordered internal target linkage;
- unit-test setup and registration of the top-level integration tests.
The final link closure is kept in one explicit location. Its order is part of
the build contract, especially for static or mixed static/shared builds:
1. internal ABACUS targets, from higher-level consumers to lower-level
providers;
2. optional external feature libraries;
3. numerical backends and their MPI, OpenMP, compiler-runtime, and system
dependencies.
Dependencies are therefore no longer accumulated through the legacy
`${math_libs}` path or scattered between the root CMakeLists.txt, test
directories, and setup modules. The old global OpenMP flag/link-option handling
is also removed in favour of imported targets and their usage requirements.
The top-level integration-test directory is registered only after the final
executable and its path are available. No integration-test cases are changed.
This is a structural cleanup only. It does not redesign dependency discovery or
change the current provider-selection logic for MKL, cuSOLVERMp, PEXSI, ELPA,
FFTW, ScaLAPACK, KML, or GPU dependencies, part of which need to be revised
seperately .
* Fix: Some testing target are exposed unconditionally
* Fix: Tests are built unconditionally
* Do not pass all targets to tests
* Fix: Link PEXSI properly
* Fix: Missing Torch libraries in DeePKS test
* Link Torch separately after the main dependency closure
* Add missing GTest dependency for DeePKS test support
Shared DeePKS test helpers include GoogleTest headers.
* Link DeePMD to the ESolver_DP unittest
* Resolve typo/mistake
* Attempt: Address PEXSI testing failure
* Move dependency discovery files to cmake/modules1 parent a446d94 commit 36fa6a1
82 files changed
Lines changed: 971 additions & 671 deletions
File tree
- cmake
- modules
- python/pyabacus
- source
- source_base
- kernels/test
- module_container
- ATen
- kernels/test
- ops/test
- test
- module_device/test
- module_grid/test
- module_mixing/test
- test_parallel
- test
- source_basis
- module_ao/test
- module_nao/test
- module_pw
- kernels/test
- test_gpu
- test_serial
- test
- source_cell
- module_neighbor/test
- module_neighlist/test
- module_symmetry/test
- test_pw
- test
- source_esolver/test
- source_estate
- kernels/test
- module_dm/test
- test_mpi
- test
- source_hamilt
- module_surchem/test
- module_vdw/test
- module_xc
- kernels/test
- test
- test
- source_hsolver
- kernels/test
- test
- source_io
- module_json/test
- test_serial
- test
- source_lcao
- module_deepks/test
- module_deltaspin/test
- module_dftu/test
- module_gint/test
- module_hcontainer/test
- module_lr
- ao_to_mo_transformer/test
- dm_trans/test
- ri_benchmark/test
- utils/test
- module_operator_lcao/test
- module_ri
- module_exx_symmetry
- test
- test
- module_rt/test
- test
- source_md/test
- source_psi/test
- source_pw
- module_pwdft
- kernels/test
- test
- module_stodft/test
- source_relax
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | | - | |
68 | | - | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
83 | 83 | | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments