Commit bcca20f
committed
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 .1 parent 59dc884 commit bcca20f
65 files changed
Lines changed: 765 additions & 607 deletions
File tree
- cmake
- 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 | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 75 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | 129 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
| |||
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
82 | | - | |
83 | 81 | | |
0 commit comments