title: How to use CMake for Fortran and C++?
body: <p>I am new to CMake and it seems really hard to get my script work. My codes can be compiled the usual way, but I really need to use CMake. I compiled with the following:</p>
  
  <pre><code>g++ vectc.cpp -c -std=c++11
  gfortran vectf.f vectc.o -lstdc++
  </code></pre>
  
  <p>This CMakeLists.txt, that doesn't work for me:</p>
  
  <pre><code>cmake_minimum_required (VERSION 2.6)
  project (add_vectors CXX Fortran)
  enable_language(Fortran)
  set(CMAKE_CXX_FLAGS "-c -std=c++11")
  set(CMAKE_Fortran_FLAGS "CMakeFiles/executable/vectc.o -lstdc++")
  add_executable( executable
  vectc.cpp
  vectf.f)
  </code></pre>
  
  <p>If I run make after cmake i get the following, and I really dont know what to do:</p>
  
  <pre><code>[ 33%] Linking CXX executable executable
  c++: warning: CMakeFiles/executable.dir/vectf.f.o: linker input file unused because linking not done
  c++: warning: CMakeFiles/executable.dir/vectc.cpp.o: linker input file unused because linking not done
  [100%] Built target executable
  </code></pre>
  
  <p>Does anyone can help me with it?</p>
  
  <p>Edit:
  The comments shows, I did not asked well. I am pretty new to the Cmake, and I don't know why I got the warnings. Also I have not found my "executable" file.    </p>