title: Build project with "experimental/filesystem" using cmake
body: <p>I need to add a "experimental/filesystem" header to my project </p>
  
  <pre><code>#include &lt;experimental/filesystem&gt;
  int main() {
      auto path = std::experimental::filesystem::current_path();
      return 0;
  }
  </code></pre>
  
  <p>So I used -lstdc++fs flag and linked with libstdc++fs.a</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.7)
  project(testcpp)
  set(CMAKE_CXX_FLAGS "-std=c++14 -lstdc++fs" )
  set(SOURCE_FILES main.cpp)
  target_link_libraries(${PROJECT_NAME} /usr/lib/gcc/x86_64-linux-gnu/7/libstdc++fs.a)
  add_executable(testcpp ${SOURCE_FILES})
  </code></pre>
  
  <p>However, I have next error:</p>
  
  <blockquote>
    <p>CMake Error at CMakeLists.txt:9 (target_link_libraries):   Cannot
    specify link libraries for target "testcpp" which is not built by<br>
    this project.</p>
  </blockquote>
  
  <p>But if I compile directly, it`s OK:</p>
  
  <pre><code>g++-7 -std=c++14 -lstdc++fs  -c main.cpp -o main.o
  g++-7 -o main main.o /usr/lib/gcc/x86_64-linux-gnu/7/libstdc++fs.a
  </code></pre>
  
  <p>Where is my mistake?</p>