setup wsl on clion code example
Example: clion WSL
MAKE SURE TO HAVE LATEST CLION BUILD
Official Guide(non detailed):https://www.jetbrains.com/help/clion/how-to-use-wsl-development-environment-in-product.html
1) install wsl 1 or 2 on your windows machine
2) copy text from this script name it wsl.sh (doesnt matter the name)and run it in your WSL
https://github.com/JetBrains/clion-wsl/blob/master/ubuntu_setup_env.sh
it says ubuntu so only use WSL ubuntu unless you know what you are doing
3) open Clion and "edit custom properties" and add "idea.case.sensitive.fs=true"
watch the video in sources for more info
4) Go to clion settings and find the toolchains tab in the build section
5) then add a WSL toolchain
6) login with WSL using local host (port 2222)or ssh follow video for more info
7) press apply and ok and it should open terminal and set up cmake
8) for valgrind find the valgrind tab and input for the path that you get
when you run the command "which valgrind" in WSL
Sources:
https://www.youtube.com/watch?v=xnwoCuHeHuY