Explicitly set LD_LIBRARY_PATH (or PATH, if running on Windows) when invoking the test programs.

This commit is contained in:
LoRd_MuldeR 2022-12-05 15:03:31 +01:00
parent e5ea933f04
commit da0321549d
3 changed files with 8 additions and 2 deletions

View File

@ -44,3 +44,9 @@ ifneq ($(STRIP),)
XLDFLAGS += -Wl,--strip-all
DLL_LDFLAGS += -Wl,--strip-all
endif
ifneq ($(firstword $(filter MINGW32_NT-% MINGW64_NT-% CYGWIN_NT-%,$(shell uname))),)
ENV_LDPATH := PATH
else
ENV_LDPATH := LD_LIBRARY_PATH
endif

View File

@ -21,7 +21,7 @@ $(ALL_PATH):
mkdir -p $@
test: all
./$(BIN_FILE)
env $(ENV_LDPATH)="$(realpath .):$(realpath ../../libhashset/lib)$(if $($(ENV_LDPATH)),:$($(ENV_LDPATH)))" ./$(BIN_FILE)
clean:
rm -vf $(BIN_FILE)

View File

@ -21,7 +21,7 @@ $(ALL_PATH):
mkdir -p $@
test: all
./$(BIN_FILE)
env $(ENV_LDPATH)="$(realpath .):$(realpath ../../libhashset/lib)$(if $($(ENV_LDPATH)),:$($(ENV_LDPATH)))" ./$(BIN_FILE)
clean:
rm -vf $(BIN_FILE)