premake/modules/d
Reynald Brassard d152f0e5e4 Added support for Visual Studio 2019 solutions
Added tests for new action
Changed how vs2019 aquires latest target Platform

Added optional userToolsVersion to vstudio
2019-03-30 12:25:08 -07:00
..
actions Added support for Visual Studio 2019 solutions 2019-03-30 12:25:08 -07:00
tests Update tests to support mixed C++/D in the D module 2018-05-07 10:14:16 +02:00
tools Add support for mixed C++/D to premake D module 2018-05-07 10:14:16 +02:00
_manifest.lua Add support for mixed C++/D to premake D module 2018-05-07 10:14:16 +02:00
_preload.lua Options: Set compilers category for cc, dc and dotnet 2018-10-22 13:44:07 +02: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 readme.md file in D module 2018-05-07 10:14:16 +02: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

D

C/C++

  • flags
    • CodeCoverage
    • UnitTest
    • Verbose
    • Profile
    • ProfileGC
    • StackFrame
    • StackStomp
    • AllTemplateInst
    • BetterC
    • Main
    • ShowCommandLine
    • ShowTLS
    • ShowGC
    • IgnorePragma
    • ShowDependencies
  • versionconstants
  • debugconstants
  • docdir
  • docname
  • headerdir
  • headername
  • dependenciesfile ("filename")
  • jsonfile ("filename")
  • importpaths { "paths" }
  • stringimportpaths { "paths" }
  • compilationmodel ("model") [ Project, Package, File ]
  • runtime ("type") [ Debug, Release ]
  • staticruntime ("state") [ on, off ]
  • optimize
  • inlining
  • boundscheck ("type") [Off, SafeOnly, On]
  • deprecatedfeatures ("feature") [ Error, Info, Allow ]

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" }