CVX variable U(N,N). How to make rank(U)=1?

I want to build a matrix U(N,N) with rank=1 in CVX? How can I do it ?

You can’t That is non-convex.

variable x(N)
x*x' % rank one. This violates CVX rules and is a non-convex thing