premake/modules/d
Ethan Wallace acda348b4b Added new 'warning' levels
Added new warning level "Everything" which turns on all available
compiler warnings. Updated "High" and "Extra" to reflect actual
differences in emitted compiler flags.
2020-06-19 14:09:14 -04:00
..
actions Added gnu++20 option 2020-06-02 11:52:44 -04:00
tests Update D module to VS2019 and latest D compiler options. 2019-06-02 03:10:41 -07:00
tools Added new 'warning' levels 2020-06-19 14:09:14 -04:00
_manifest.lua Add support for mixed C++/D to premake D module 2018-05-07 10:14:16 +02:00
_preload.lua Update D module to VS2019 and latest D compiler options. 2019-06-02 03:10:41 -07:00
d.lua Add support for mixed C++/D to premake D module 2018-05-07 10:14:16 +02:00
LICENSE.txt Move core modules into main repository; drop submodules 2016-11-09 14:29:33 -05:00
README.md Update D module to VS2019 and latest D compiler options. 2019-06-02 03:10:41 -07:00

Premake Extension to support the D language

Features

  • Support actions: gmake, vs20xx (VisualD)
  • Support all compilers; DMD, LDC, GDC
  • Support combined and separate compilation

Usage

Simply add:

language "D"

to your project definition and populate with .d files.
C and C++ projects that include .d files will also support some of the API below. Any API tagged with (D/C/C++) works in D and C/C++ projects. Any API tagged with (C/C++) only works for .d files in C/C++ projects.

APIs

  • flags
    • AllInstantiate
    • CodeCoverage
    • Color
    • Documentation
    • GenerateHeader
    • GenerateJSON
    • GenerateMap
    • IgnorePragma
    • LowMem
    • Main
    • PerformSyntaxCheckOnly
    • Profile
    • ProfileGC
    • Quiet
    • RetainPaths
    • ShowCommandLine
    • ShowDependencies
    • ShowGC
    • ShowTLS
    • StackFrame
    • StackStomp
    • SymbolsLikeC
    • UnitTest
    • UseLDC
    • Verbose
  • boundscheck ("type") [Off, SafeOnly, On]
  • compilationmodel ("model") [ Project, Package, File ]
  • checkaction
  • computetargets
  • debugconstants
  • debuglevel
  • dependenciesfile ("filename")
  • deprecatedfeatures ("feature") [ Error, Info, Allow ]
  • docdir
  • docname
  • headerdir
  • headername
  • importdirs { "paths" }
  • inlining
  • jsonfile ("filename")
  • importdirs
  • optimize
  • preview
  • revert
  • runtime ("type") [ Debug, Release ]
  • staticruntime ("state") [ on, off ]
  • stringimportdirs { "paths" }
  • transition
  • versionconstants
  • versionlevel

Example

The contents of your premake5.lua file would be:

solution "MySolution"
    configurations { "release", "debug" }

    project "MyDProject"
        kind "ConsoleApp"
        language "D"
        files { "src/main.d", "src/extra.d" }