[CMake] Re: heads up on convenience lib ? and a problem on source
files with similar names...
Asmodehn Shade
asmodehn at gmail.com
Wed May 9 06:21:01 EDT 2007
On Wed, 9 May 2007 00:48:25 +0200
Asmodehn Shade <asmodehn at gmail.com> wrote:
> Hello everyone,
>
> I've seen in the FAQ and mailing list, that CMake doesnt support convenience libraries right now.
> I was trying to set up a set of cmake files to help in builds, when the directory hierarchy is already decided.
> Anyway I gave up my ideas of having convenience libraries for now. So now I add every sourcefile to the main target.
>
> But I ve had problem with that strategy. One of my old convenience library has a source file named "source.c" and my main target has a source file named "source.cc"
> From that it seems that Cmake builds only one "source.o", ignoring one of the source files...
>
> So here are my questions :
> - What is the status of supporting convenience libraries ? Anyone knows if / when this will be likely to work ?
> - Does someone has a solution to the problem of source file with similar name ( other than renaming my files, and the naming conventions I ve had everywhere so far ;) ) ??
> Maybe cmake could just build source.o and source_1.o for example ? or some other name matching pattern based on the path and extension ?
>
> Thanks a lot,
>
> --
> Asmodehn
>
Hi everyone,
After having a closer look at this issue I dont think it s name related anymore, even if I dont have a clue right now ^^ .
Anyway now having source.c and source.cc in the source for my target, I ended up with a " cannot determine link language " although I carefully wrote :
PROJECT ( target CXX )
When forcing the link language :
SET_TARGET_PROPERTIES(${project_name} PROPERTIES LINKER_LANGUAGE CXX)
I can see in my source that some of my .cc file became .c ...
Well it my be an error on my side, How ever I wonder how cmake works when mixing C and C++ code. Is there a doc about that somewhere ?
Most of my problem comes from that I think, as I am trying to mix convenience lib C code and C++ target code.
So I wonder what s the best option for me right now... wait for convenience lib support in cmake ;) ? rewrite my C code in C++ look-alike files ? keep looking for bugs in my macros ?
I have a sample of my hierarchy to test my macros if someone is interested, probably a bit too big to put it right here...
Thanks for any hints,
--
Asmodehn
More information about the CMake
mailing list