[CMake] OS/Compiler Versioning for External Libs

Brian Hone brian.hone at baesystems.com
Thu Jan 6 14:25:39 EST 2005


Hi there,

I'm setting up a new CMake repository.  Everything within our code tree 
is great.  CMake makes everything easy.

Now I need to set up external dependencies.  Unfortunately, we support 
several OS's + compilers.  Is there a right way to handle this?

For instance, let's say I have library foo.  I need to be able to link 
against:

somedir/solaris-gcc-3.2.2/lib/libfoo.so and somedir/solaris-gcc-3.2.2/inc

or

somedir/solaris-cc/lib/libfoo.so

or

somedir/linux-gcc-3.3.3/lib/libfoo.so

etc.

My thinking is to try to grab the system/compiler version and put it 
into the link and include dirs, but I can't figure out how to get 
compiler version, only compiler name.  

Or am I thinking about this wrong?

Thanks for your help,

Brian



More information about the CMake mailing list