diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-12-29 15:51:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-29 15:51:04 +0100 |
commit | 2d3564eb47c4be93aba8254db9a3a3524e935b5e (patch) | |
tree | c521857dea648b5ffc7877051e51c738676d1e7b | |
parent | 9133e8b340714066e9f4a63a6fb04a42991da1da (diff) | |
parent | 032a1f8567d477c0b67944f31ad672468f38b09c (diff) |
Merge pull request #1274 from SaberUK/master+cxx
Add interactive-mode support for setting the compiler binary.
-rwxr-xr-x | configure | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -143,9 +143,15 @@ if ($interactive) { $config{CXX} = find_compiler($config{CXX} // $ENV{CXX}); unless ($config{CXX}) { - print "A suitable C++ compiler could not be detected on your system!\n"; - print "Set the CXX environment variable to the compiler binary path if this is incorrect.\n"; - exit 1; + say 'A suitable C++ compiler could not be detected on your system!'; + unless ($interactive) { + say 'Set the CXX environment variable to the path to a C++ compiler binary if this is incorrect.'; + exit 1; + } + until ($config{CXX}) { + my $compiler_path = prompt_string 1, 'Please enter the path to a C++ compiler binary:', 'c++'; + $config{CXX} = find_compiler $compiler_path; + } } my %compiler = get_compiler_info($config{CXX}); |