title: How do cmake configuration and default build task configuration play together in VSCode?
body: <p>I'm compiling this <a href="https://pcl.readthedocs.io/en/latest/using_pcl_pcl_config.html#using-pcl-pcl-config" rel="nofollow noreferrer">PCL Library example</a>. For reference, it consists of a simple cpp file that includes some PCL headers and does some basic data manipulation, and a CMakeLists.txt file.</p>
  <p>Using the command line, I am able to build it using cmake -&gt; make. I want to build it also using VSCode IDE. When I open this project on VSCode, it detects I'm using cmake, and if I clean/build it using the cmake extension, everything seems to work as expected (including autocompletion by intellisense, etc).</p>
  <p>However, this takes some time as it builds the whole project in the same way you would do it from the command line, only from VSCode. I wanted to understand if I can also configure a &quot;default build task&quot; (via the tasks.json file) to build files using Ctrl + Shift + B, and be able to build individual files, and have a more IDE-Like experience (something like the incremental compiler of Eclipse with Java, for example).</p>
  <p>If I add a C++ configuration, it fails to find .h files, and errors are highlighted on the open file, until I clean/rebuild via de cmake extension.</p>
  <p>My question is, are this two options (cmake extension vs build tasks) compatible or mutually exclusive? Is defining and compiling via a task in fact more agile than building via the cmake extension?</p>
  <p>Thanks!</p>