cmake –version
CMake Error: The source directory "/home/pi/cmake-3.20.0-rc4/–version" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
你这是源码安装的cmake吧,试试加上cmake的相对路径或者绝对路径
不知道你这个问题是否已经解决, 如果还没有解决的话:看cmake官方文档中写到对于简单的项目只需要一个三行CMakeLists.txt文件。如下图所示