nimbus.nim: ban in-source builds

This commit is contained in:
Anna “CyberTailor” 2022-06-29 10:52:54 +05:00
parent 225f91c6aa
commit 1e7778a143
Signed by: CyberTaIlor
GPG Key ID: E7B76EDC50864BB1
2 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,7 @@ file is located.
.It Ar buildDir
Build directory,
location where all generated files should be placed.
In-source builds are explicitly banned.
.
.It Fl Fl binDir : Ns Ar path
Set the executable directory.

View File

@ -47,6 +47,9 @@ proc setup(options: Options) =
echo "Source dir: " & options.getSourceDir()
echo "Build dir: " & options.getBuildDir()
if options.getSourceDir() == options.getBuildDir():
quit("In-source builds are not allowed")
let pkgInfo = initPackageInfo(options)
echo "Project name: " & pkgInfo.name
echo "Project version: " & pkgInfo.version