diff options
Diffstat (limited to 'share/qbs/modules/cpp/GenericGCC.qbs')
-rw-r--r-- | share/qbs/modules/cpp/GenericGCC.qbs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index 5cad42578..d81fb15c8 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -242,6 +242,17 @@ CppModule { } validate: { + if (!File.exists(compilerPath)) { + var pathMessage = FileInfo.isAbsolutePath(compilerPath) + ? "at '" + compilerPath + "'" + : "'" + compilerPath + "' in PATH"; + throw ModUtils.ModuleError("Could not find selected C++ compiler " + pathMessage + ". " + + "Ensure that the compiler is properly " + + "installed, or set cpp.toolchainInstallPath to a valid " + + "toolchain path, or consider whether you meant to set " + + "cpp.compilerName instead."); + } + var validator = new ModUtils.PropertyValidator("cpp"); validator.setRequiredProperty("architecture", architecture, "you might want to re-run 'qbs-setup-toolchains'"); |