To run you need to have the pru compiler and pru software support package downloaded.
When running cmake, use the following flags:
-DCMAKE_EXE_LINKER_FLAGS="-iti-cgt-pru_2.3.3/lib AM335x_PRU.cmd"
-DPRU_COMPILER_HOME=ti-cgt-pru_2.3.3
-DPRU_SOFTPKG_HOME=pru-software-support-package-5.9.0
Modify according to your local paths.
Use custom-compiler-clpru.yaml to configure CLion with the pru compiler. See this.
AM335x_PRU.cmd is a linker file provided by TI and can be found in the software package.
Very useful, thank you!