I have some C++ code I build with CMake (3.x), which I need to link using g++ 4.x rather than 5.x due to a Boost library issue.
My system has /usr/bin/g++ linking to /usr/bin/g++-5.2 , and also /usr/bin/g++-4.9 . Obviously I could have my CMakeLists.txt manually choose /usr/bin/g++-4.9 as my compiler, but that means it'll break on another system... how can I get CMake to find "a version of g++ >=4 but < 5"? Or "The latest version of g++ that's still < 5"?