i know this was asked a long time ago, but maybe it will be useful for someone. i'm a beginner, regarding all this stuff, so if anybody knows a better way to do it, please correct me. here is how i set up clion for arduino (on windows 10):
clion 2016.1.3 + arduino 1.6.9 + plugin
0) download and install the official arduino ide (1.6.9)
1) download and install mingw to 'C:\MinGW' (https://sourceforge.net/projects/mingw/files/latest/download?source=files)
2) in mingw, install: 'mingw32-base' and 'mingw32-gcc-g++'
3) download and install clion (https://www.jetbrains.com/clion/download/#section=windows-version)
4) create an 'untitled' project, just to open clion
5) in clion > settings > plugins > browse repositories > search for and install: 'arduino' (tools integration), and 'serial monitor' (misc)
6) in clion > settings > search > type 'mingw'
7) at the environment select 'use mingw home', and browse to mingw folder ('C:\MinGW'). press apply, and wait until clion finds the environment
8) in file > close project
9) open any file manager and go to 'c:\Users\name\ClionProjects\' and delete the 'untitled' project you just created
10) open clion, select 'new arduino sketch project'
11) in the project directory > 'open cmakleists.txt' and configure lines:
6: set board version
7: set port (you can find out port# from the arduino ide)
8: set the path where you installed your arduino libraries (arduino sketch folder)
set(${CMAKE_PROJECT_NAME}_BOARD uno)
set(${CMAKE_PROJECT_NAME}_PORT COM3)
LINK_DIRECTORIES(c:\\ARDUINO\\libraries)
12) in the upper right corner in clion, near the green 'play' button, select 'edit configuration', on the left select 'application' > 'upload', and set:
-target: 'upload'
-configuration: 'debug'
-executable: the project name
then press ok
13) in the project .ino file write some really simple code (blink)
14) connect an arduino uno via usb, and press the green 'play' button to upload the sketch
15) to start serial monitor:
-in clion main window bottom left, click serial monitor tab (in 'the tool buttons')
-click the wrench icon to set up port and baud rate
-on the top of the wrench icon click the blue 'connect' icon
-if values did not appear 'correctly', click the white 'switch to hex' icon (on the right of the wrench)
-before uploading sketch, disconnect the serial monitor
17) for clion to properly find the libraries, make sure to use the same name for the lib folder as for the '.h' file. example: for DallasTemperature.h use folder name DallasTemperature. after #inlcude-ing new libs, right click on 'external libraries folder' and select 'reload cmake project'.
18) you may want to do further configuration in clion settings like: theme, colours, text size, etc.
19) also, you can configure some handy 'live templates', like: serialprintln, digitalwrite, pinmode, switch, etc. to enhance your productivity.