title: Can someone explain why my cmake file fails to build my cpp file?
body: <p>So I've got the following CMakeLists.txt file to try and build my main.cpp file.</p>
  
  <pre><code>     project(shell)
  
       set(extra_flags = -std=c++11 -Werror -Wall -Wextra)
       set(CMAKE_CXX_FLAGS $(CMAKE_CXX_FLAGS) $(extra_flags))
       add_executable(shell main.cpp)
  </code></pre>
  
  <p>At this point, I am just trying to build it with a Hello World program just to make sure everything works. But the flags are there for the rest of the program that I need to write. The actual process of calling <code>cmake .</code> works just fine, but when I use <code>make</code> I get the following error:</p>
  
  <pre><code>[100%] Building CXX object CMakeFiles/shell.dir/main.cpp.o
  c++: fatal error: no input files
  compilation terminated.
  /bin/sh: 1: -o: not found 
  CMakeFiles/shell.dir/build.make:54: recipe for target 'CMakeFiles/shell.dir/main.cpp.o' failed
  make[2]: *** [CMakeFiles/shell.dir/main.cpp.o] Error 127
  CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/shell.dir/all' failed
  make[1]: *** [CMakeFiles/shell.dir/all] Error 2
  Makefile:72: recipe for target 'all' failed
  make: *** [all] Error 2
  </code></pre>
  
  <p>I'm new to Ubuntu and the command line, so any help would be greatly appreciated.</p>