Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Project variants for building both libraries and applications?: (5 Items)
   
Project variants for building both libraries and applications?  
Is it possible to configure a QNX C/C++ project to have 2 variants: one that outputs a shared library, and one that 
outputs an application?

Here's what I'd like to do: In projects that output shared libraries, I'd like to have one variant that compiles test 
code for that library into a runnable executable. So, for every library project, have the 2 usual variants (debug & 
release) and another variant that can execute tests on the code in the library.

A co-worker and I took a crack at this earlier and didn't have much success. Any ideas?
Re: Project variants for building both libraries and applications ?  
I am not sure if you can easily do that, but here is an idea on how you 
could (maybe) organize your projects:

project a: most of your source that can be tested, you generate static 
library (*.a) here
project b: your executable - your application that links .a library above
project c: your test application - links static lib. from project a) and 
tests the code.

Re: Project variants for building both libraries and applications  
Yea, we've got it broken down into 2 projects right now (1 for the library code, 1 for the test code application), and 
it seems to be working out alright. That being said, having it all in one project is a more ideal case for a few reasons
 (less projects in the workspace, no need to download rebuilt shared libs to target, etc)... 

Any chance something like this could get rolled into a later revision?
Re: Project variants for building both libraries and applications  
Mike Zinni wrote:
>
> Yea, we've got it broken down into 2 projects right now (1 for the 
> library code, 1 for the test code application), and it seems to be 
> working out alright. That being said, having it all in one project is 
> a more ideal case for a few reasons (less projects in the workspace, 
> no need to download rebuilt shared libs to target, etc)...
>
> Any chance something like this could get rolled into a later revision?
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post6 
> <http://community.qnx.com/sf/go/post6822>;
>


Technically it is possible to implement (you know, make supports more 
than one target :-) But I cannot promise we will do it soon because 
there have been  no requests on that so far.

Regards,
Alex
RE: Project variants for building both libraries and applications  
Yea, I know we can play with make, and we have, but all attempts have
crashed and burned so far. We got close, but no cigar. That's why I was
calling in the big guns, aka you guys... 

If any of you guys have a spare minute, a sample project showing us
n00bs how to do it correctly would be uber-helpful...

Thanks,

Mike

-----Original Message-----
From: Alex Chapiro [mailto:achapiro@qnx.com] 
Sent: Wednesday, April 16, 2008 5:52 AM
To: general-ide
Subject: Re: Project variants for building both libraries and
applications

Mike Zinni wrote:
>
> Yea, we've got it broken down into 2 projects right now (1 for the 
> library code, 1 for the test code application), and it seems to be 
> working out alright. That being said, having it all in one project is 
> a more ideal case for a few reasons (less projects in the workspace, 
> no need to download rebuilt shared libs to target, etc)...
>
> Any chance something like this could get rolled into a later revision?
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post6 
> <http://community.qnx.com/sf/go/post6822>;
>


Technically it is possible to implement (you know, make supports more 
than one target :-) But I cannot promise we will do it soon because 
there have been  no requests on that so far.

Regards,
Alex

_______________________________________________
General
http://community.qnx.com/sf/go/post6870
 
- CONFIDENTIAL-
This email and any files transmitted with it are confidential, and may also be legally privileged.  If you are not the 
intended recipient, you may not review, use, copy, or distribute this message. If you receive this email in error, 
please notify the sender immediately by reply email and then delete this email.