[CMake] Nonstandard architectures.

Mathias Froehlich M.Froehlich at science-computing.de
Thu Sep 27 09:36:11 EDT 2007


Hi,

On Thursday 27 September 2007 11:33, Dizzy wrote:
> Also generally, FIND_LIBRARY(), FIND_FILE() (which are generally used in
> FindPackage scripts) are both configurable setting some variables for the
> paths (see the cmake man page on them).
So you can avoid that cmake will look into /lib and /usr/lib for example?

What to do then with the OpenGL test for example?
It adds its own knowledge about the standard paths where OpenGL is usually 
installed. But That paths only include the standard abi variants of those 
paths.

I need to make sure that the ones with the correct abi are found. Sure I can 
do that with CMAKE_LIBRARY_PATH. But I also need to make sure that libs that 
are present in */lib paths are not found if they do not match the required 
abi. That is cmake should not just look into */lib paths. Or it must have a 
way to check if the abi will match.

> In your example, the native arch it's x86-64 or x86? And then you are
> compiling for a target x86 or x86-64?
The native arch is x86-64. And I compile for x86-64. The native archs libs 
will be in */lib64 instead of the usual */lib paths. But cmake looks in */lib 
directories where some x86 libs are present that are not present for the 
x86-64 case.
The question here is even worse - which one is the native one?? lib or lib64??
And which ones should cmake accept?

> I would not like to have cmake do very strict checks such as autoconf by
> default, because then we will get the same speed as with autoconf (which
> was very slow) and you generally don't need those strict checks. I would  
> like to have it both, so you can do both fast checks (checking for
> existence of files) and compile-test checks (checking if it actually
> compiles) in a configurable way. So maybe there should be a new attribute
> to FIND_PACKAGE() (as we have the REQUIRED attribute) say named "STRICT"
> and have code in FindPackage modules that when STRICT is present there will
> also be a test-compile check done (using CHECK_LIBRARY_EXISTS and such) on
> the found library.
Having that STRICT flag should not be a per target flag.
It would help me if there is a switch to make that the global default.
Better correctness then speed.

CHECK_LIBRARY_EXISTS is a C implementaiton?

May be you want to fiddle with the output of the file command?
Well, you need to know what abis are available and compatible and which one is 
compiled with the configured compiler.

   Greetings

          Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 



More information about the CMake mailing list