title: CLion and Platformio: target not found. Configuration issues
body: <p>I followed this <a href="http://docs.platformio.org/en/latest/ide/clion.html" rel="nofollow noreferrer">link</a> to be able to use CLion for arduino projects using Platformio. I'm having two issues that I'll post here as I think that might be related.</p>
  
  <p><strong>First Issue</strong></p>
  
  <p>I'm getting stuck in the last step, which says</p>
  
  <blockquote>
    <p>Build project (DO NOT use “Run” button, see marks on the screenshot above): Menu: Run > Build.</p>
  </blockquote>
  
  <p>As you can see in the next image, PLATFORMIO_BUILD target is broken and I can't run it.</p>
  
  <p><a href="https://i.stack.imgur.com/5Duru.png" rel="nofollow noreferrer">Build bar</a></p>
  
  <p>Editing configurations looks like this, and I don't know if its meant to be like this. As you can see in the next image, the error says: Target PLATFORMIO_BUILD not found.</p>
  
  <p><a href="https://i.stack.imgur.com/sp7rc.png" rel="nofollow noreferrer">Edit Configurations Window</a></p>
  
  <p>I've repeated the procedure several times, with no luck. CLion is 2017.2.3 and Platformio is last version as well.</p>
  
  <p>The project itself is fine, since if I run <code>platformio run --target upload</code> from the command line, the project compiles and is uploaded to the arduino.</p>
  
  <p><strong>Second Issue</strong></p>
  
  <p>All files in my project show a yellow header saying:</p>
  
  <blockquote>
    <p>This file does not belong to any project target, code insight features
    might not work properly</p>
  </blockquote>
  
  <p>Due to this, many of the benefits of using CLion are gone.</p>
  
  <p>All these files, as well as the folders containing them are greyed out. I'm not sure if I should include them manually on CMAKELists, but as I understood, the command <code>platformio init --ide clion --board uno</code> already takes care of this.</p>
  
  <p>It's first time using CLion and might be that the problem resides in some basic configuration I'm not aware of. Thanks!</p>