cmake_policy(SET CMP0139 OLD)

if("/path1" PATH_EQUAL "/path2")
  message("PATH_EQUAL recognized")
endif()