allow parallel build for netgen subproject

This commit is contained in:
Matthias Hochsteger 2017-01-10 12:39:12 +01:00
parent d557e59a69
commit d6c6fbab98

View File

@ -132,13 +132,19 @@ set_vars( NETGEN_CMAKE_ARGS
INTEL_MIC
)
if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
set(NETGEN_BUILD_COMMAND $(MAKE) --silent )
else()
set(NETGEN_BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/netgen --config ${CMAKE_BUILD_TYPE})
endif()
ExternalProject_Add (netgen
DEPENDS ${NETGEN_DEPENDENCIES}
SOURCE_DIR ${PROJECT_SOURCE_DIR}
CMAKE_ARGS -DUSE_SUPERBUILD=OFF ${NETGEN_CMAKE_ARGS} -DCMAKE_PREFIX_PATH=${INSTALL_DIR}
INSTALL_COMMAND ""
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/netgen
BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/netgen --config ${CMAKE_BUILD_TYPE}
BUILD_COMMAND ${NETGEN_BUILD_COMMAND}
STEP_TARGETS build
)