[CMake] Unnecessary ordering breaks existing CMakeLists.txt
Brad King
brad.king at kitware.com
Wed Aug 16 12:34:32 EDT 2006
Dataflow wrote:
> Hi Brad,
>
> 1) While choosing libraries to be linked for debug/release, I am getting the
> following error:
> ----
> It is impossible to order the linker search path in such a way that
> libraries specified as full paths will be picked by the linker.
> Directories and libraries involved are:
> Directory: i:\Projects\dcls\winbuild\Debug contains:
> Library: i:/Projects/dcls/winbuild/Release/dfslib.lib
>
> Directory: i:\Projects\dcls\winbuild\Release contains:
> Library: i:/Projects/dcls/winbuild/Debug/dfslib.lib
> ----
> This is confusing at best!! How does the Release directory contain the debug
> lib and vice varsa?
>
> Is this because (as per windows convention) both the libs use the same name
> 'dfslib.lib'? (It is a plain static library.)
Yes, and because per-configuration subdirectories are automatically
considered during linking. Try specifying just
i:/Projects/dcls/winbuild/dfslib.lib
as the library without any per-configuration options. This will
automatically get split into something like
-Li:/Projects/dcls/winbuild/$(OutDir) -Li:/Projects/dcls/winbuild
dfslib.lib
BTW, was the other project built by CMake too? If so there are
conventions already established to export it for use by find_package in
another project. It is covered in the "Mastering CMake" book.
> 2) Can I suggest to change the 'Error' dialog (of ccmake) to use a read-only
> edit field instead of a static field, so that the error messages can be
> easily copied for pasting... That will avoid having to type the long error
> messages (such as above) by hand.
Sure:
http://www.cmake.org/Bug
> 3) The brain teaser..
> Debug = debug
> Release = release
> MinSizeRel = optimized
> RelWithDebInfo = ????
Eventually one will be able to specify a library for each configuration,
but for now "debug" is Debug and "optimized" is all others.
-Brad
More information about the CMake
mailing list