build: override CMAKE_ARGS for Windows+MSYS2 environments re: libbacktrace

Otherwise `-G"MinGW Makefiles"` is included in `CMAKE_ARGS`, which does not
function correctly in MSYS2 Bash.
This commit is contained in:
Michael Bradley, Jr 2022-06-23 14:01:55 -05:00
parent 1088e43c2d
commit 54616ab727
No known key found for this signature in database
GPG Key ID: 9FCA591DA4CE7D0D
1 changed files with 11 additions and 1 deletions

View File

@ -96,8 +96,18 @@ codex.nims:
ln -s codex.nimble $@
# nim-libbacktrace
LIBBACKTRACE_MAKE_FLAGS := -C vendor/nim-libbacktrace --no-print-directory BUILD_CXX_LIB=0
libbacktrace:
+ $(MAKE) -C vendor/nim-libbacktrace --no-print-directory BUILD_CXX_LIB=0
ifeq ($(detected_OS), Windows)
# MSYS2 detection
ifneq ($(MSYSTEM),)
+ $(MAKE) $(LIBBACKTRACE_MAKE_FLAGS) CMAKE_ARGS="-G'MSYS Makefiles'"
else
+ $(MAKE) $(LIBBACKTRACE_MAKE_FLAGS)
endif
else
+ $(MAKE) $(LIBBACKTRACE_MAKE_FLAGS)
endif
coverage:
$(MAKE) NIMFLAGS="--lineDir:on --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage" testAll