Add complicated switching for cxx flags
add CMake install options