mercredi 27 décembre 2017

template for new cmake c++ project: compiler option

I start new cross-platform c++ project and want to find good template, like autotools hello world.

I want:

  1. Check if compiler supports c++11
  2. If c++ comipler is clang or gcc then enable as much as possible warnings like -Wall, -Wextra and so on
  3. precompile headers support, and some file(s) to which I will add new headers for precompilation
  4. Simple way to enable/disable sanitizers
  5. Simple way to enable/disable code coverage gathering
  6. Simple way to enable/disable clang static analyzer

Can you point or give such cmake template for new project?

Aucun commentaire:

Enregistrer un commentaire