cpm-cmake / CPM.cmake

📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FetchContent failure when using CPM on a single project with multiple subdirectories with cmake < 3.17

Anton3 opened this issue · comments

Related: #192

Minimal structure:

.
├── CMakeLists.txt
├── get_cpm.cmake
├── libA
│   └── CMakeLists.txt
└── libB
    └── CMakeLists.txt

Here, both libA and libB use the same get_cpm.cmake to download their third-party dependencies.

The symptoms are the same as in #192. The solution is the same as well, we just need to relax the conditions for the extra include(FetchContent).