Instead of setting CMAKE_CXX_FLAGS directly, we should use features in newer cmake versions for enabling C++11 support. See #11 for some discussion.
The only thing stopping this right now is support for Ubuntu 14.04 which has older version of cmake (v2.8.12), so this should be done after EOL for that Ubuntu release.