diff options
-rw-r--r-- | compiler/modules.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/modules.nim b/compiler/modules.nim index dd8ccedb1..05b795473 100644 --- a/compiler/modules.nim +++ b/compiler/modules.nim @@ -190,10 +190,11 @@ proc wantMainModule* = fatal(gCmdLineInfo, errCommandExpectsFilename) gProjectMainIdx = addFileExt(gProjectFull, NimExt).fileInfoIdx +passes.gIncludeFile = includeModule +passes.gImportModule = importModule + proc compileProject*(projectFileIdx = -1'i32) = wantMainModule() - passes.gIncludeFile = includeModule - passes.gImportModule = importModule let systemFileIdx = fileInfoIdx(options.libpath / "system.nim") let projectFile = if projectFileIdx < 0: gProjectMainIdx else: projectFileIdx if projectFile == systemFileIdx: |