[CMake] shell in Unix Makefiles
naryniecki
naryniecki at o2.pl
Thu Apr 22 09:29:54 EDT 2010
Dnia 22 kwietnia 2010 15:04 Magnus Therning <magnus at therning.org> napisał(a):
> On Thu, Apr 22, 2010 at 10:23, naryniecki <naryniecki at o2.pl> wrote:
> > Hi,
> >
> > I know there is such possibility, but I have also few directories with
> > which are compiled and linked in "normal" way. In such situation I
> > would have to create custom target for this big directory. But I had
> > problem how to create target which say: compile all *.cpp files from
> > directory to .o files. I tried to use CMAKE_C_COMPILE_OBJECT somehow
> > or CMAKE_C_FLAGS but it didn't work. I had "\" signs in CMAKE_C_FLAGS
> > and couldn't remove. I wrote to this list some time ago but no answer.
>
> I'm not quite sure I understand what you are trying to do. AFAIU your
> goal is to do the following:
>
> - compile every C++ file in the directory
> - link the resulting object files into a library
>
> Is that correct?
>
Yes, exactly.
For each directory I have:
FILE(GLOB_RECURSE FILES sources/Ald/*.cpp)
add_library(Ald STATIC ${FILES})
but one directory has to much files and I can't change it.
br
Marek
> /M
>
> --
> Magnus Therning (OpenPGP: 0xAB4DFBA4)
> magnus?therning?org Jabber: magnus?therning?org
> http://therning.org/magnus identi.ca|twitter: magthe
>
More information about the CMake
mailing list