Commit 95204b1
zxy.monado
Fix: remove dead
`source/source_base/test/CMakeLists.txt:1` calls
`abacus_disable_feature_definitions(__MPI)`, so `__MPI` is never defined for any
target in that directory and every `#ifdef __MPI` in it is always false.
`opt_tn_test.cpp` and gave those two targets a real `mpi_test_main.cpp`. What
remains of the pattern is:
- `global_function_test.cpp` -- three `#ifdef __MPI / #undef __MPI / #endif`
blocks. Their test bodies sit *outside* the `#ifdef`, so they always compiled;
the blocks are pure no-ops.
- `math_chebyshev_test.cpp` -- guards wrapping `checkconverge` and
`checkconverge_float`, so those two bodies were compiled out in *every*
configuration: two tests reporting PASS while asserting nothing.
- `opt_cg_test.cpp`, `opt_test_tools.cpp` -- a file-level `#undef __MPI` that only
duplicates what CMake already does.
The `#undef __MPI` / `#define __MPI` pairs were no-ops in any case: the
preprocessor cannot retroactively change headers already processed above, and the
library these tests link against is a separate translation unit, compiled with
`__MPI` regardless of what the test does.
The two chebyshev bodies this exposes are handled in the next commit.#undef __MPI toggles from source_base tests1 parent 25ecb4d commit 95204b1
4 files changed
Lines changed: 0 additions & 22 deletions
File tree
- source/source_base/test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | 698 | | |
702 | 699 | | |
703 | 700 | | |
| |||
712 | 709 | | |
713 | 710 | | |
714 | 711 | | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | 712 | | |
719 | 713 | | |
720 | 714 | | |
| |||
733 | 727 | | |
734 | 728 | | |
735 | 729 | | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | 730 | | |
740 | 731 | | |
741 | 732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
337 | | - | |
338 | 336 | | |
339 | 337 | | |
340 | 338 | | |
| |||
376 | 374 | | |
377 | 375 | | |
378 | 376 | | |
379 | | - | |
380 | | - | |
381 | 377 | | |
382 | 378 | | |
383 | 379 | | |
| |||
622 | 618 | | |
623 | 619 | | |
624 | 620 | | |
625 | | - | |
626 | | - | |
627 | 621 | | |
628 | 622 | | |
629 | 623 | | |
| |||
647 | 641 | | |
648 | 642 | | |
649 | 643 | | |
650 | | - | |
651 | 644 | | |
652 | 645 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | 1 | | |
5 | 2 | | |
6 | 3 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | 1 | | |
5 | 2 | | |
6 | 3 | | |
| |||
0 commit comments