I am deploying a small application to several different systems (mac, linux, linux64) where it needs to be compiled. I would like to tell cmake to the latest gcc available in a particular system. For example, Mac 10.6 has gcc 4.0 and gcc 4.2 (default). But some users have also gcc 4.4 installed through MacPorts (it is not the default). I would like cmake to use gcc44 in this case. In other linux systems, the latest gcc is 4.4 or 4.5 What is the more robust way to achieve this?
Thanks,
H