The issue seem to be, that clion
can't find the cmake
, C compiler, or C++ compiler of the WSL. My guess is that you haven't installed those yet.
You can install gcc
with:
sudo apt install build-essential
This article explains how to build cmake
:
Go to — https://cmake.org/files/ That shows all the list of the versions of cmake, I use cmake-3.15.0-rc1.tar.gz.
Open your terminal or bash and download it.
wget https://cmake.org/files/v3.15/cmake-3.15.0-rc1.tar.gz
After downloading, then untar.
tar -xvzf cmake-3.15.0-rc1.tar.gz
cd cmake-3.15.0-rc1/
./bootstrap
sudo make
sudo make install
cd /bin/
sudo cp cmake /usr/bin/
Now don’t forget we are currently in cmake-3.15.0-rc1/ just go back by entering cd ..
. that takes you up one directory back.
Now copy the directory to /usr/bin/share
sudo cp -r cmake-3.15.0-rc1/ /usr/share/cmake-3.15
export CMAKE_ROOT=/usr/share/cmake-3.15
After you have done that, clion
should be able to detect everything correctly.