diff --git a/Makefile b/Makefile index c11c0a3..e5df22a 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,14 @@ ifeq ($(OS),Windows_NT) else NULDEV := /dev/null JOBS ?= $(shell nproc 2>/dev/null || echo 4) - CMAKE_GEN := + # Si Ninja està al PATH, l'usem (més ràpid i paral·lelitza millor). + # Si no, deixem que CMake usi el generador per defecte (Unix Makefiles). + HAS_NINJA := $(shell ninja --version 2>/dev/null) + ifneq ($(HAS_NINJA),) + CMAKE_GEN := -G "Ninja" + else + CMAKE_GEN := + endif endif # VERSION (única font de veritat: source/utils/defines.hpp).