Open PowerShell as Administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Setup Ubuntu WSL environment: install CMake, GCC or/and Clang, configure and run openssh-server.
The following ubuntu_setup_env.sh script that can help you with the configuration. If you are using Linux distribution different from Ubuntu, you might need some adjustments to the script.
wget https://raw.githubusercontent.com/JetBrains/clion-wsl/master/ubuntu_setup_env.sh && bash ubuntu_setup_env.sh
ssh username@localhost -p2222
Run CLion, make sure that configured WSL distribution is running and can be accessed via ssh. Check the detailed blog post about WSL support in CLion.
Configure the WSL toolchain in Build, Execution, Deployment | Toolchains in CLion.
Due to the IntelliJ platform issue, there is an issue with WSL file-system which is case-sensitive and Windows FS which is not.
As workaround you can pass properties (Help -> “Edit Custom Properties…”): idea.case.sensitive.fs=true, restart an IDE and rebuild the project index (File -> “Invalidate Caches and Restart”) after that.