Found this on AskOxford.com. Both are correct.
verb 1 (often compare to/with) estimate, measure, or note the similarity or dissimilarity between. 2 (compare to) point out or describe the resemblances of (something) with. 3 (usu. compare with) be similar to or have a specified relationship with another thing or person.