diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-10-14 15:43:35 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-10-14 15:43:35 (GMT) |
commit | 9210fef65b6ca6b527cfdf42b91cc27fc975f73d (patch) | |
tree | fa59e855185f2e4d4aa825ee6142a734d92c265c /Source/cmEnableLanguageCommand.cxx | |
parent | 9430c3f33591e1f9c4bb2d0d1b7fbd3486c3ff6e (diff) | |
download | CMake-9210fef65b6ca6b527cfdf42b91cc27fc975f73d.zip CMake-9210fef65b6ca6b527cfdf42b91cc27fc975f73d.tar.gz CMake-9210fef65b6ca6b527cfdf42b91cc27fc975f73d.tar.bz2 |
ENH: better error message for mis-configured nmake environment
Diffstat (limited to 'Source/cmEnableLanguageCommand.cxx')
-rw-r--r-- | Source/cmEnableLanguageCommand.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmEnableLanguageCommand.cxx b/Source/cmEnableLanguageCommand.cxx index b1e5622..560c833 100644 --- a/Source/cmEnableLanguageCommand.cxx +++ b/Source/cmEnableLanguageCommand.cxx @@ -25,9 +25,16 @@ bool cmEnableLanguageCommand if(args.size() < 1 ) { this->SetError - ("ENABLE_LANGUAGE called with incorrect number of arguments"); + ("called with incorrect number of arguments"); return false; } + if(this->Makefile->GetCMakeInstance()->GetIsInTryCompile()) + { + this->SetError + ("called from a try_compile, " + "all languages must be enabled before trying them."); + return false; + } for (std::vector<std::string>::const_iterator it = args.begin(); it != args.end(); ++it) |