title: cmake & gcc compiles every file every time
body: <p>I'm a learning c++ developer writing a game initially on the Mac platform using XCode, but now moving to cross platform by leveraging CMake. So far I can get it compiled on my ickle linux netbook and I'm putting together a dev environment on this machine for on the go coding. However I'm finding that gcc recompiles every file whenever I make a change. Clearly I need some additional configuration to the CMakeLists.txt . My current one is very simple. Like so;</p>
  
  <pre><code>cmake_minimum_required (VERSION 2.8)
  set (source
  Creature.cpp
  DisplayManager.cpp
  Engine.cpp
  EngineState.cpp
  Entity.cpp
  GameWorld.cpp
  GfxSFML.cpp
  Item.cpp
  Map.cpp
  Position.cpp
  Projectile.cpp
  ScreenTile.cpp
  SquadAI.cpp
  Terrain.cpp
  UIButton.cpp
  UICharPanel.cpp
  UIView.cpp
  Utility.cpp
  Weapon.cpp
  fov.cpp
  main.cpp
  )
  
  find_package (OpenAL)
  find_package (OpenGL)
  find_package (SFML)
  
  set(CMAKE_CXX_FLAGS "-g -Wall -pg")
  add_executable (tractionedge ${source})
  target_link_libraries(tractionedge ${SFML_LIBRARY} ${OPENGL_LIBRARY} ${OPENAL_LIBRARY})
  </code></pre>
  
  <p>I've concentrated so far on C++ as a language rather than build systems by sticking with XCode for everything. My knowledge of Autotools (make?) and Gcc is very limited. How do I have gcc only recompile the changed source?</p>