Build attempts to compile all files in library, not just those included, or fails to find anything

VSCode auto-suggests the CMake extension when a CMake file is opened purely based on the file extension, but this is separate from PlatformIO. The CMake extension doesn’t interact with the PlatformIO extension in any way constructively – if anything, they might try to get into each others way if they’re trying to define VSCode configuration files in .vscode/ at the same time. In general, PlatformIO can’t process CMake build instructions since it’s built on SCons (Python) and has it’s own library.json meta-format for build information for a library. The only special exception is the ESP32 + ESP-IDF combination where PlatformIO has coded a special wrapper to actually use the CMake files. This doesn’t work anywhere else though so if you’re not using exactly that, it doesn’t apply.

Also the CMake extension has been reported to conflict with the PlatformIO extension in some cases related to debugging tasks (Supporting PlatformIO and non PlatformIO development on same system/), so if they are problems or CMake isn’t actually used, that extension should be removed.