Eclipse: add -j only on UNIX hosts

The previous version added -jN to the make invokation if UNIX
was set, but this was true also when cross compiling.
What we are actually interested in is CMAKE_HOST_UNIX, i.e.
whether the build host is UNIX.
Or we should check more exactly what CMAKE_MAKE_PROGRAM is.

Alex
This commit is contained in:
Alex Neundorf 2013-11-23 23:48:43 +01:00
parent 26ccafea46
commit 83751af219
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ processorcount(_CMAKE_ECLIPSE_PROCESSOR_COUNT)
# Only set -j if we are under UNIX and if the make-tool used actually has "make" in the name # Only set -j if we are under UNIX and if the make-tool used actually has "make" in the name
# (we may also get here in the future e.g. for ninja) # (we may also get here in the future e.g. for ninja)
if("${_CMAKE_ECLIPSE_PROCESSOR_COUNT}" GREATER 1 AND UNIX AND "${CMAKE_MAKE_PROGRAM}" MATCHES make) if("${_CMAKE_ECLIPSE_PROCESSOR_COUNT}" GREATER 1 AND CMAKE_HOST_UNIX AND "${CMAKE_MAKE_PROGRAM}" MATCHES make)
set(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS "-j${_CMAKE_ECLIPSE_PROCESSOR_COUNT}") set(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS "-j${_CMAKE_ECLIPSE_PROCESSOR_COUNT}")
endif() endif()