Improved portability of CMakelist.txt

 - Using variables to handle os/compiler differences,
   thus removing if/else
 - Using ccpcheck predefined template gcc/vs
Fixed Doxyfile to always warn if undoc