new env var: USE_SYSTEM_NIM

This commit is contained in:
Ștefan Talpalaru 2020-04-15 17:25:03 +02:00
parent 3ff26b54eb
commit 988217cc53
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
3 changed files with 15 additions and 1 deletions

View File

@ -4,6 +4,12 @@
GNU Make, Bash and the usual POSIX utilities.
## Make flags
* use the system Nim instead of the shipped version (usually for testing Nim devel versions)
`make USE_SYSTEM_NIM=1 test`
## License
Licensed and distributed under either of

View File

@ -82,3 +82,6 @@ endif
# AppVeyor/Travis cache of $(NIM_DIR)/bin
CI_CACHE :=
# bypassing the shipped Nim, usually for testing new Nim devel versions
USE_SYSTEM_NIM := 0

View File

@ -26,9 +26,14 @@ export NIM_PATH=$(cd "${ABS_PATH}/../vendor/Nim/bin"; pwd)
# Nimble needs this to be an absolute path
export NIMBLE_DIR=$(cd "${ABS_PATH}/../../.nimble"; pwd)
# we don't use Nimble-installed binaries, but just in case
export PATH="${NIMBLE_DIR}/bin:${PATH}"
#- make it an absolute path, so we can call this script from other dirs
#- we can't use native Windows paths in here, because colons can't be escaped in PATH
export PATH="${NIM_PATH}:${NIMBLE_DIR}/bin:${PATH}"
if [[ "$USE_SYSTEM_NIM" != "1" ]]; then
export PATH="${NIM_PATH}:${PATH}"
fi
# used by nim-beacon-chain/tests/simulation/start.sh
export BUILD_OUTPUTS_DIR="${ABS_PATH}/../../../build"