Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to set the output type of a package: exe, static lib, (shared lib) #26

Closed
tavi-cacina opened this issue Feb 27, 2013 · 3 comments

Comments

@tavi-cacina
Copy link
Contributor

I couldn't find any option to set the output type of a package. It always builds the package_name.exe. If not yet done, would be nice to have the direction defined, so that somebody could implement it.

@tavi-cacina
Copy link
Contributor Author

some light was brought in the NG, so I cite here for the record:

On Saturday, 2 March 2013 at 14:07:44 UTC, Sönke Ludwig wrote:

Am 02.03.2013 09:19, schrieb Jonathan M Davis:

There should also probably clear examples of how to set up an
application vs a library. It seems to want to set up an
application by default, and I assume that you make it a
library by mucking with dflags in the configuration file, but
how that jives with having an executable with -unittest, I
don't know.

As it stands, there are just two modes of operation:

  1. invoking dub on a project will build it as an application
    (any
    "source/app.d" file is assumed to contain the main() function)
  2. any dependent package is assumed to be a library and gets
    compiled in
    without its "source/app.d" file.

This is currently tied to the simplified workflow that I use.
Although I
find this to be a quite nice approach in general and it covers
most uses
nicely, support to specify explicit library types will be added
later.

@s-ludwig
Copy link
Member

s-ludwig commented Mar 7, 2013

The foundation for full support has been layed now in 3a4452a by adding a new "targetType" build setting (see the updated package format spec).

However, the different generators do not yet have full support for all target types.

s-ludwig added a commit that referenced this issue Mar 7, 2013
Other changes:
 - Made the comparison for "excludedSourceFiles" path format agnostic
 - Fixed the output directory for the VisualD generator
 - Removed the "binaryPath" global setting (which was undocumented up to now)

See also #26 and #29.
@s-ludwig
Copy link
Member

s-ludwig commented Mar 7, 2013

The functionality should now be complete. It has not been tested extensively though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants