diff --git a/makefiles/Makefile.cpp.mk b/makefiles/Makefile.cpp.mk index e4fe5dfed4..3d405ca29f 100644 --- a/makefiles/Makefile.cpp.mk +++ b/makefiles/Makefile.cpp.mk @@ -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) diff --git a/makefiles/Makefile.third_party.unix.mk b/makefiles/Makefile.third_party.unix.mk index ef47a0bb8f..181228f104 100644 --- a/makefiles/Makefile.third_party.unix.mk +++ b/makefiles/Makefile.third_party.unix.mk @@ -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. diff --git a/makefiles/Makefile.third_party.win.mk b/makefiles/Makefile.third_party.win.mk index 7172db9baf..bd2b5585ce 100644 --- a/makefiles/Makefile.third_party.win.mk +++ b/makefiles/Makefile.third_party.win.mk @@ -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: