Fix cmake to work with cuda separable compilation