build/nimconf

Types

Config = ref object
  NimMajor*: int
  NimMinor*: int
  NimPatch*: int
  paths*: OrderedSet[string]
  nimblePaths*: OrderedSet[string]
  nimcacheDir*: string
  outDir*: string

Procs

proc getProjectDir(): string {...}{.raises: [], tags: [].}
Get project directory for this compilation - returns "" at runtime
proc getNimConfig(projectDir = ""): Config {...}{.raises: [ValueError, OSError, Exception,
    IOError, KeyError], tags: [ExecIOEffect, ReadIOEffect, RootEffect, WriteIOEffect,
                            ReadEnvEffect].}
proc getNimConfigFlags(projectDir = ""): string {...}{.
    raises: [ValueError, OSError, Exception, IOError, KeyError], tags: [ExecIOEffect,
    ReadIOEffect, RootEffect, WriteIOEffect, ReadEnvEffect].}

Get Nim command line configuration flags for projectDir

If projectDir is not specified, it is detected if compile time or current directory is used.

proc writeNimConfig(cfgFile: string; projectDir = "") {...}{.
    raises: [ValueError, OSError, Exception, IOError, KeyError], tags: [ExecIOEffect,
    ReadIOEffect, RootEffect, WriteIOEffect, ReadEnvEffect].}

Write Nim configuration for projectDir to specified cfgFile

If projectDir is not specified, it is detected if compile time or current directory is used.

proc getNimcacheDir(projectDir = ""): string {...}{.
    raises: [ValueError, OSError, Exception, IOError, KeyError], tags: [ExecIOEffect,
    ReadIOEffect, RootEffect, WriteIOEffect, ReadEnvEffect].}
Get nimcache directory for current compilation or specified projectDir
proc getOutDir(projectDir = ""): string {...}{.raises: [ValueError, OSError, Exception,
    IOError, KeyError], tags: [ExecIOEffect, ReadIOEffect, RootEffect, WriteIOEffect,
                            ReadEnvEffect].}
Get output directory for current compilation or specified projectDir
proc getNimteropCacheDir(): string {...}{.raises: [ValueError, OSError, Exception, IOError,
    KeyError], tags: [ExecIOEffect, ReadIOEffect, RootEffect, WriteIOEffect,
                    ReadEnvEffect].}
Get location to cache all nimterop artifacts
proc fixRelPath(path: string): string {...}{.raises: [], tags: [].}
If path is relative, consider relative to projectPath