Commit 3ee9551
committed
Guard functional_cpp population for CMake older than 3.18
FetchContent's SOURCE_SUBDIR handling was added in CMake 3.18, but the
project's minimum is 3.14; on 3.14-3.17, MakeAvailable would have
add_subdirectory'd functional_cpp's top-level CMakeLists.txt, pulling its
own src/tests into this build. Branch on the CMake version: 3.18+ keeps the
SOURCE_SUBDIR MakeAvailable path, older versions populate the sources via
FetchContent_Populate, which never calls add_subdirectory at all. The
deprecated-in-3.30 Populate call sits behind the VERSION_LESS 3.18 check,
so modern CMake never executes it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NUt3c1wdseRtRSSXfg3MCK1 parent 096d18c commit 3ee9551
1 file changed
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 29 | + | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
39 | 50 | | |
40 | 51 | | |
41 | 52 | | |
| |||
0 commit comments