build: add quotes around CMAKE_GENERATOR variable

This will fix the following error when using generators that have a
space in them, e.g. "Unix Makefiles":

"CMake Error: Could not create named generator Unix".

Closes https://github.com/neovim/neovim/issues/30218.
This commit is contained in:
dundargoc 2024-09-02 12:51:30 +02:00 committed by dundargoc
parent 60ea046741
commit ef8067a19d

View File

@ -14,7 +14,7 @@ else
TOUCH := touch TOUCH := touch
RM := rm -rf RM := rm -rf
CMAKE := $(shell (command -v cmake3 || echo cmake)) CMAKE := $(shell (command -v cmake3 || echo cmake))
CMAKE_GENERATOR ?= $(shell (command -v ninja > /dev/null 2>&1 && echo "Ninja") || echo "Unix Makefiles") CMAKE_GENERATOR ?= "$(shell (command -v ninja > /dev/null 2>&1 && echo "Ninja") || echo "Unix Makefiles")"
define rmdir define rmdir
rm -rf $1 rm -rf $1
endef endef