Open johannessen opened 2 years ago
Thanks for this. I've been on the lookout for something like this for a while.
Maybe merge and release this? :-}
ExtUtils::CppGuess might be a better option as Alien::proj does not itself use c++ (it is only needed for the share builds). The most recent version of that module fails on many systems, though: https://github.com/tsee/extutils-cppguess/issues/30.
EU::CppG has always reported a "failure" (refused to install) if it couldn't find a C++ compiler. ExtUtils::F77 does very similar. What is it you think it should do in that circumstance?
Here, it seems that A:proj could detect it needed to do a share install, and dynamically add a dependency on EU:CppG, since I gather from this discussion it needs a C++ compiler for that to succeed.
I tried installing Alien::proj on a system that didn’t have a C++ compiler. Not being aware of the compiler being missing, I spent some time looking through your recent changes regarding cmake, searching for a problem that didn’t exist.
I feel like a note in the documentation would be useful.
This PR also adds a check for C++ that prints a message right at the start if no suitable compiler can be found. Not sure how helpful this will turn out to be, but I suppose it can’t hurt?