[Cmake] Library list compression?

Amitha Perera perera at cs.rpi.edu
Wed May 23 17:38:29 EDT 2001


Would it be possible to do a library search path and list compression?
That is, compress
   ... -La -Lb -La -La -Lb -lx -ly -lz -ly ...
to
   ... -La -Lb -lx -ly -lz ...

In the vxl framework, in order to get the library dependencies right,
the same libraries are specified multiple times. This leads to
extremely long link lines. Not really a problem, but it would be
cleaner to avoid them. Also, since the same library appears multiple
times as a dependency, the resulting makefile contains multiple
rules for the library, which leads to many make warnings.

Compressing the search paths should cause no problems, since they are
always used left to right. Compressing the libraries could potentially
cause a problem with weird libraries (where the same symbol is defined
inconsistently in multiple libraries), but under normal situtations,
it should also work.

Or perhaps there is a cleaner way of specifing the dependencies?

Thanks,
Amitha.




More information about the CMake mailing list