add BUILD_TYPE and JOBS to make commands

This commit is contained in:
Laurent Perron
2022-02-23 10:29:21 +01:00
parent db9c8237d0
commit 49a629afa7
3 changed files with 6 additions and 1 deletions

View File

@@ -29,6 +29,8 @@ OR_TOOLS_LIBS = $(LIB_DIR)/$(LIB_PREFIX)ortools.$L.$(OR_TOOLS_MAJOR)
endif
endif
JOBS ?= 4
# Main target
.PHONY: cc # Build C++ OR-Tools library.
.PHONY: test_cc # Run all C++ OR-Tools test targets.
@@ -40,7 +42,7 @@ or-tools-libs: $(OR_TOOLS_LIBS)
# OR Tools unique library.
$(OR_TOOLS_LIBS): $(THIRD_PARTY_TARGET)
cmake --build dependencies --target install --config Release -j 8
cmake --build dependencies --target install --config $(BUILD_TYPE) -j $(JOBS)
$(TOUCH) $(OR_TOOLS_LIBS)
compile_libraries: $(OR_TOOLS_LIBS)

View File

@@ -9,6 +9,7 @@ USE_COINOR ?= ON
USE_SCIP ?= ON
USE_GLPK ?= OFF
PROTOC ?= $(OR_TOOLS_TOP)/bin/protoc
BUILD_TYPE ?= Release
# Main target.
.PHONY: third_party # Build OR-Tools Prerequisite
@@ -29,6 +30,7 @@ dependencies/Makefile: | dependencies
-DUSE_COINOR=$(USE_COINOR) \
-DUSE_SCIP=$(USE_SCIP) \
-DUSE_GLPK=$(USE_GLPK) \
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
-DCMAKE_INSTALL_PREFIX=$(OR_ROOT_FULL)
.PHONY: clean_third_party # Clean everything. Remember to also delete archived dependencies, i.e. in the event of download failure, etc.

View File

@@ -14,6 +14,7 @@ PROTOC = "$(OR_TOOLS_TOP)\\bin\\protoc.exe"
BUILD_PYTHON ?= OFF
BUILD_JAVA ?= OFF
BUILD_DOTNET ?= OFF
BUILD_TYPE ?= Release
# Main target.
dependencies: