Re: [Qbs] Build static and dynamic libraries

2017-10-30 Thread Stephan Gatzka
> One possible approach: > > --- MyFiles.qbs --- > Group { > files: "f1.c" > } > > --- MyProject.qbs --- > import "MyFiles.qbs" as MyFiles > > Project { > Product { > name: "p1" > MyFiles { } > } > > Product { > name: "p2" > MyFiles { } >

Re: [Qbs] Set properties via command line

2017-06-09 Thread Stephan Gatzka
> Hm, I did not find outdated info there. Which part are you referring > to? Well, it's not outdated but an example howto set the "craziness" from the command line just fits very well, IMO. Regards, Stephan ___ Qbs mailing list Qbs@qt-project.org

[Qbs] Set properties via command line

2017-06-08 Thread Stephan Gatzka
Hi all, I have a problem to set a property in a product from the qbs command line: Product { name: "unitTestRunner" property bool showCoverageData: false ... Rule { ... prepare: { if (product.showCoverageData) { } } } } If I run: qbs

Re: [Qbs] qbs no longer works

2017-05-25 Thread Stephan Gatzka
Ok, I built qbs 1.8.0 myself from the repo and I don't see any of these problems. Looks like an arch linux package problem. Regards, Stephan ___ Qbs mailing list Qbs@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs

[Qbs] qbs no longer works

2017-05-24 Thread Stephan Gatzka
Hi all, I just upgraded to version 1.8.0 (coming with qtcreator 4.3.0) and even the simplest project no longer works: import qbs 1.0 Project { name: "test project" CppApplication { name: "main" files: [ "main.c", ] } } The output I get is: qbs -f

Re: [QBS] qbs.compilerVersion* undefined in qtcreator

2016-07-09 Thread Stephan Gatzka
> There is no such property. Do you mean cpp.compilerVersion? Eh, yes, my fault. > If so, thenĀ  > please file a bug report and attach an example project to reproduce theĀ  > problem with. Done here: https://bugreports.qt.io/browse/QTCREATORBUG-16581 Regards, Stephan

[QBS] qbs.compilerVersion* undefined in qtcreator

2016-07-07 Thread Stephan Gatzka
Hi all, in several qbs modules I wrote i check qbs.compilerVersion* to push flags depending on the compiler version. This works perfectly if I run qbs from the command line but qbs.compilerVersion* is undefined when I run the stuff within qtcreator. Is that an expected behavior? Thanks,

[QBS] qbs and qtcreator profile names

2015-08-30 Thread Stephan Gatzka
Hi! I'm not sure if this is the correct mailing list or if it should be addressed to the qtcreator list. I setup a project with qbs that cross compiles for an embedded system. For creating a filesystem I also need to compile some tools running on my build machine, so I used profiles: [gcc] it

[QBS] Follow-up on reproducible builds

2015-08-23 Thread Stephan Gatzka
Hi, We still lack a test for reproducible builds. I asked the gcc guys and got the answer, that pretty much anything compiled with -flto leads to different binaries. So I tried it out: cat a.c: int bar (void) { return 0; } gcc -flto -c -o a1.o a.c gcc -flto -c -o a2.o a.c diff a1.o a2.o Binary

Re: [QBS] Per file compile switches

2015-08-18 Thread Stephan Gatzka
Well, what's the best way to proceed? I could easily extend the cpp module and gcc.js to support reproducible builds and upload the path to gerrit for a code review. Is that's the way to go? Kind regards, Stephan ___ QBS mailing list

Re: [QBS] Per file compile switches

2015-08-16 Thread Stephan Gatzka
Well, you could put each file in its own Group and set cpp.commonCompilerFlags in each Group. I'm not suggesting you actually do this due to the inconvenience, but it raises an interesting question about how we could potentially make something like this more usable. I think a new

Re: [QBS] Per file compile switches

2015-08-16 Thread Stephan Gatzka
I think, you shall write custom module based on gcc module. Sure, that's certainly possible. But I'd like to avoid the effort if (someone?) decides that this is worth to integrate in the default cpp module. Regards, Stephan ___ QBS mailing list

[QBS] multiple AutoTestRunner problem

2015-08-15 Thread Stephan Gatzka
Hi again! I have to different directories with qbs files to build and run unit tests. In both files the Project has an AutotestRunner { }. I can correctly build and run these single qbs file. Now I have a top level product that shall build an run all tests: Project { name: all tests

[QBS] Per file compile switches

2015-08-15 Thread Stephan Gatzka
Hi again! I miss a functionality I could easily achieve with cmake. To make a reproducible build with gcc, I need to call gcc with -frandom-seed=hash. As the man page of gcc states: The number should be different for every file you compile The hash itself could be easily calculated with

[QBS] qbs property namespace

2015-08-13 Thread Stephan Gatzka
Hi! I'd like to access a property defined in a Module with in a JavaScriptCommand return by prepare in a Rule: Module { property string serverPort: 12345 Rule { ... prepare: { var cmd = new JavaScriptCommand(); cmd.sourceCode = function() { ...

Re: [QBS] qbs property namespace

2015-08-13 Thread Stephan Gatzka
Hi! Thanks for the hint, but this doesn't really work: You must set the property of cmd object in prepare script. cmd.serverPort = serverPort; It seems that I have to write cmd.serverPort = product.moduleProperty(exampleModule, serverPort); Than it works. Regards, STephan

Re: [QBS] Setting multiple profiles for sub-projects

2015-08-11 Thread Stephan Gatzka
Hi! It seems to me that what you are trying to do is not what the profiles property is for. The use case it is intended to support is projects that need to incorporate different architectures in the same build (e.g. Android projects or cross-compiled projects that need to build host

Re: [QBS] strange behaviour with cpp.linkerFlags

2015-07-20 Thread Stephan Gatzka
Thanks Joerg, With version 1.3.4 I could specifiy cpp.linkerFlags: [-u,read,-u,write] expanding to -u read -u write when gcc is called for linking. With version 1.4.1 the same line expands to -u read write which is obviously not working. Did I specified it incorrectly or have I found a

[QBS] strange behaviour with cpp.linkerFlags

2015-07-18 Thread Stephan Gatzka
Hi, I've seen a change between qbs 1.3.4 and 1.4.1. With version 1.3.4 I could specifiy cpp.linkerFlags: [-u,read,-u,write] expanding to -u read -u write when gcc is called for linking. With version 1.4.1 the same line expands to -u read write which is obviously not working. Did I specified it

Re: [QBS] qbs and Altera NIOS toolchain

2015-07-12 Thread Stephan Gatzka
If You don't find any cpp module property, e.g. linkerFlags for abuse, Well, no, linkerFlags are evaluated after the input objects, so too late. You could write a shell wrapper script as a replacement for nios2-g++. That script calls nios2-g++ and either inserts -msys-crt='crt0.o' hardcoded

[QBS] qbs and Altera NIOS toolchain

2015-07-11 Thread Stephan Gatzka
Hi all, I'm building a project for an Altera NIOS system using qbs. The toolchain Altera provide is a somwhat patched gcc. Overall, things are running pretty nice. The only problem I have is that the linker (Altera always links with gcc or g++) expectd a very special switch -msys-crt0=path to

Re: [QBS] run script after building products

2015-03-04 Thread Stephan Gatzka
I guess, You forgot to mark the rule as multiplex in order to catch all files at once. Thanks Richard, that saved my day. Runs pretty cool now. Regards, Stephan ___ QBS mailing list QBS@qt-project.org

Re: [QBS] run script after building products

2015-03-03 Thread Stephan Gatzka
Tim, Here's my solution, for converting elf to bin. NOTE THAT YOU MUST LEAVE application IN THE TYPE LIST. Otherwise the run configuration of the Bare Metal projects won't work. What you described is not exactly what I want to do. Your example converts an elf binary into a bin file for every