summaryrefslogtreecommitdiffstats
path: root/Source/cmBuildCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmBuildCommand.cxx')
-rw-r--r--Source/cmBuildCommand.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx
index 3722ab6..91d55a5 100644
--- a/Source/cmBuildCommand.cxx
+++ b/Source/cmBuildCommand.cxx
@@ -87,6 +87,14 @@ bool cmBuildCommand
const char* makeprogram
= this->Makefile->GetDefinition("CMAKE_MAKE_PROGRAM");
+ if(!makeprogram)
+ {
+ this->Makefile->IssueMessage(
+ cmake::FATAL_ERROR,
+ "build_command() requires CMAKE_MAKE_PROGRAM to be defined. "
+ "Call project() or enable_language() first.");
+ return true;
+ }
// If null/empty CONFIGURATION argument, GenerateBuildCommand uses 'Debug'
// in the currently implemented multi-configuration global generators...