the mainmodule option has effect only when no explicit module is given

This commit is contained in:
Zahary Karadjov 2013-01-28 00:26:49 +02:00
commit 19e795e017
5 changed files with 11 additions and 12 deletions

View file

@ -382,15 +382,14 @@ proc CommandSuggest =
proc wantMainModule =
if gProjectFull.len == 0:
Fatal(gCmdLineInfo, errCommandExpectsFilename)
if optMainModule.len == 0:
Fatal(gCmdLineInfo, errCommandExpectsFilename)
else:
gProjectName = optMainModule
gProjectFull = gProjectPath / gProjectName
gProjectMainIdx = addFileExt(gProjectFull, nimExt).fileInfoIdx
var oss: PGenericSeq
proc dbgseqimp(x: PGenericSeq) {.cdecl.} =
oss = x
seqdbg = dbgseqimp
proc resetMemory =
resetCompilationLists()
ccgutils.resetCaches()