CMake function for adding compiler flags