Merge pull request #124 from status-im/build/msys2_fix

build: override CMAKE_ARGS for Windows+MSYS2 environments re: libbacktrace
This commit is contained in:
Michael Bradley 2022-06-23 16:27:10 -05:00 committed by GitHub
commit 2f475115d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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