According to the recent guidelines, the priority should be given to the Pokémon with higher CMP. So in a way, attack stat is prioritized over others like defense and hit points as well as CP when evolving a Pokémon. However, higher IVs always is preferable more than the attack stat if you have to choose between two different Pokémon.