Re: CMake and D

2022-08-07 Thread rempas via Digitalmars-d-learn
On Saturday, 6 August 2022 at 18:22:45 UTC, Jan Allersma wrote: I figured out a strategy to solve te problem: 1) Create a C++ function which will be called in D. 2) Build a static C++ library with CMake and add dependencies (In my case: SDL libraries) 3) Create a new project (`dub init`). 4)

Re: CMake and D

2022-08-06 Thread Jan Allersma via Digitalmars-d-learn
On Saturday, 6 August 2022 at 13:52:28 UTC, Jan Allersma wrote: I forgot that I have to add some DUB dependencies. So I have to use `dub` instead of `dmd`. My strategy is to 1) Create a D function which will be called in C++. 2) Build a static library containing the D function (using `dub

Re: CMake and D

2022-08-06 Thread Jan Allersma via Digitalmars-d-learn
I forgot that I have to add some DUB dependencies. So I have to use `dub` instead of `dmd`. My strategy is to 1) Create a D function which will be called in C++. 2) Build a static library containing the D function (using `dub build`). 3) Build an executable file with CMake. However, I get an

Re: CMake and D

2022-08-06 Thread Jan Allersma via Digitalmars-d-learn
On Thursday, 4 August 2022 at 20:59:50 UTC, Johan wrote: On Thursday, 4 August 2022 at 20:29:30 UTC, Jan Allersma wrote: So something goes wrong with linking, but I dont know what. Execute `dmd -v` on some test program. It will output the linker line at the end of the output, the line

Re: CMake and D

2022-08-04 Thread pascal111 via Digitalmars-d-learn
On Thursday, 4 August 2022 at 20:59:50 UTC, Johan wrote: On Thursday, 4 August 2022 at 20:29:30 UTC, Jan Allersma wrote: So something goes wrong with linking, but I dont know what. Execute `dmd -v` on some test program. It will output the linker line at the end of the output, the line

Re: CMake and D

2022-08-04 Thread Johan via Digitalmars-d-learn
On Thursday, 4 August 2022 at 20:29:30 UTC, Jan Allersma wrote: So something goes wrong with linking, but I dont know what. Execute `dmd -v` on some test program. It will output the linker line at the end of the output, the line starting with `cc yourcode.o -o yourcode ...`. On that linker

CMake and D

2022-08-04 Thread Jan Allersma via Digitalmars-d-learn
Hello, I am trying to compile an application with both C++ and D source code. First I have `main.d`: ``` extern (C++) void init(); extern (C++) void draw(int row, int column, int x, int y); extern (C++) void render(); void main() { init(); draw(3, 3, 0, 0); draw(3, 3, 2, 2);

Re: CMake for D

2014-05-09 Thread Chris Piker via Digitalmars-d-learn
include directory for dmd under CMake? I can arbitarily add a -J option to the compiler flags but should the cmake-d module include a variable that should be set? -- Chris

Re: CMake for D

2014-05-09 Thread Trent Forkert via Digitalmars-d-learn
on the way. Dragos What is the best way to specify a mixin include directory for dmd under CMake? I can arbitarily add a -J option to the compiler flags but should the cmake-d module include a variable that should be set? -- Chris The way I've tackled that in my (still work-in-progress) CMake

Re: CMake for D

2014-05-09 Thread Chris Piker via Digitalmars-d-learn
, there is no guarantee of that, so proceed with caution. ... it would be great to have better D support in CMake, I really hope your changes do get committed upstream. I plan on using D somewhat quitely for about a year and after I've worked out the gotcha's start talking to my programming friends

Re: CMake for D

2014-05-08 Thread Chris Piker via Digitalmars-d-learn
On Monday, 24 March 2014 at 23:55:14 UTC, Dragos Carp wrote: I moved cmaked2 to github [1], updated and simplified the usage a little (system cmake patch not necessary anymore). You can give it a try. Dub registry support is also on the way. [1] - https://github.com/dcarp/cmake-d Verified

Re: CMake for D

2014-03-25 Thread Trent Forkert
registry support is also on the way. Regards Dragos [1] - https://github.com/dcarp/cmake-d Heh, seems I waited a bit too long, eh? I've been gearing up to do an initial release of some modifications to CMake that give better D support. (To clarify: this isn't being merged upstream yet

Re: CMake for D

2014-03-24 Thread ed
and may have a better option for CMake+D also. Cheers, ed

Re: CMake for D

2014-03-24 Thread Dragos Carp
Any alternatives?? I moved cmaked2 to github [1], updated and simplified the usage a little (system cmake patch not necessary anymore). You can give it a try. Dub registry support is also on the way. Regards Dragos [1] - https://github.com/dcarp/cmake-d

Re: CMake for D

2014-03-24 Thread Andrei Alexandrescu
/cmake-d Fantastic, thanks Dragos!! A fellow Romanian it seems :o) -- Andrei

Re: CMake for D

2014-03-24 Thread ed
://github.com/dcarp/cmake-d You beat me to it :) I was going to github my version today at work but I'll drop it now and work from your repo. Thanks setting it up! Cheers, ed

Re: CMake for D

2014-03-24 Thread Trent Forkert
://github.com/dcarp/cmake-d Heh, seems I waited a bit too long, eh? I've been gearing up to do an initial release of some modifications to CMake that give better D support. (To clarify: this isn't being merged upstream yet, but hopefully that'll happen eventually) While the approach taken

Re: CMake for D

2014-03-23 Thread Igor
On Tuesday, 14 February 2012 at 07:35:26 UTC, Gour wrote: On Tue, 14 Feb 2012 01:37:20 +0100 bioinfornatics bioinfornat...@fedoraproject.org wrote: Maybe send a pull request to main cmake repo will be better. It is always better to put code to upstream I did ask in the mailing list

CMake for D

2012-02-13 Thread Kai Meyer
I have some D code that I would like to integrate into an existing CMake infrastructure. I've seen these two projects: http://www.dsource.org/projects/cmaked http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/cmake/modules/language_support/cmake/Platform/ Both are quite old. Can anybody

Re: CMake for D

2012-02-13 Thread Gour
On Mon, 13 Feb 2012 12:15:23 -0700 Kai Meyer k...@unixlords.com wrote: Both are quite old. Can anybody comment on the usability of either of these projects? Or perhaps point me to another project that will work? Try with newer: http://code.google.com/p/cmaked2/ Sincerely, Gour -- The

Re: CMake for D

2012-02-13 Thread bioinfornatics
Le lundi 13 février 2012 à 20:45 +0100, Gour a écrit : On Mon, 13 Feb 2012 12:15:23 -0700 Kai Meyer k...@unixlords.com wrote: Both are quite old. Can anybody comment on the usability of either of these projects? Or perhaps point me to another project that will work? Try with newer:

Re: CMake for D

2012-02-13 Thread Gour
On Tue, 14 Feb 2012 01:37:20 +0100 bioinfornatics bioinfornat...@fedoraproject.org wrote: Maybe send a pull request to main cmake repo will be better. It is always better to put code to upstream I did ask in the mailing list (sometime ago) about the procedure to include it to upstream, but got