summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-12-20 14:41:32 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-12-20 14:41:32 (GMT)
commit7974dced73a9efaf2b268f8c3a647054c75ff401 (patch)
tree1558db8aaf8ae3636e919ab6af9c9e5578fbcaed /Source/cmLocalUnixMakefileGenerator3.cxx
parent6f29fdd7cd1272f0714fce5028ff9d73e9805ea6 (diff)
parentbd11de085757f170c5880d99291048b9f512a120 (diff)
downloadCMake-7974dced73a9efaf2b268f8c3a647054c75ff401.zip
CMake-7974dced73a9efaf2b268f8c3a647054c75ff401.tar.gz
CMake-7974dced73a9efaf2b268f8c3a647054c75ff401.tar.bz2
Merge topic 'make-entry-no-parallel'
bd11de0 Makefile: Allow "gmake target1 target2 -j" (#14312)
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 7e97f78..20e8eea 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1685,6 +1685,17 @@ void cmLocalUnixMakefileGenerator3
"default_target",
depends,
no_commands, true);
+
+ // Help out users that try "gmake target1 target2 -j".
+ cmGlobalUnixMakefileGenerator3* gg =
+ static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
+ if(gg->AllowNotParallel())
+ {
+ std::vector<std::string> no_depends;
+ this->WriteMakeRule(ruleFileStream,
+ "Allow only one \"make -f Makefile2\" at a time, but pass parallelism.",
+ ".NOTPARALLEL", no_depends, no_commands, true);
+ }
}
this->WriteSpecialTargetsTop(ruleFileStream);