Don't append -k and -j flags to command line when we are using nmake.
ClosedPublic

Authored by arrowd on Dec 20 2015, 9:55 AM.

Details

Summary

Select default make tool based on which platform we are, not the compiler we using. On windows first try "make" (extremely rare), then "mingw32-make" and then "nmake". Fix typo in method name.

Diff Detail

Repository
R32 KDevelop
Branch
5.0
Lint
Lint Skipped
Unit
Unit Tests Skipped
arrowd updated this revision to Diff 1554.Dec 20 2015, 9:55 AM
arrowd retitled this revision from to Don't append -k and -j flags to command line when we are using nmake..
arrowd updated this object.
arrowd edited the test plan for this revision. (Show Details)
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptDec 20 2015, 9:55 AM
arrowd added a project: KDevelop.
kfunk added a subscriber: kfunk.Dec 20 2015, 11:12 AM

Looks good to me in general. +1.

projectbuilders/makebuilder/makebuilderpreferences.cpp
81

Nitpick: if ( foo ) -> if (foo)

projectbuilders/makebuilder/makejob.cpp
186

Let's factor the makeBin != ... out in some free bool isUnixMake(const QString& makeBin) function.

Also: makeBin could be a fully-qualified path, protect against this.

Just noticed: /N and /K are valid arguments to nmake, so it'd make sense to pass them instead of the Unix Make counterparts -n and -k.

Example:

if ( ! builderGroup.readEntry("Abort on First Error", true)) {
    cmdLine << (isUnixMake(...) ? "-k" : "/K");
}

Also see: https://msdn.microsoft.com/en-us/library/afyyse50.aspx

arrowd updated this revision to Diff 1555.Dec 20 2015, 11:48 AM
  • Don't append -k and -j flags to command line when we are using nmake.
arrowd marked 2 inline comments as done.Dec 20 2015, 11:51 AM
arrowd updated this revision to Diff 1557.Dec 20 2015, 12:16 PM

Pass NMake flags with slashes, not minuses.

arrowd updated this revision to Diff 1558.Dec 20 2015, 12:20 PM

Pass NMake flags with slashes, not minuses. Now for real.

kfunk accepted this revision.Dec 20 2015, 12:26 PM
kfunk added a reviewer: kfunk.

Nice!

This revision is now accepted and ready to land.Dec 20 2015, 12:26 PM