Added cmake flags to build tests