[CMake] Makefile generators that support compiled sources and linked objects in one rule/command?

Eric (Brad) Lemings brad at rebit.com
Wed Oct 29 11:53:32 EDT 2008


Greetings,

I was wondering if the Makefile generators only generate rules for
compiling sources and linking libraries/objects into executables as
seperate targets or is there a rule/command for building executables by
compiling sources and linking libraries/objects in one command. 
Something to the effect of the following:

host:~> cat test01.cpp
int main () { return 0; }
host:~> cat test02.cpp
void f() {}
host:~> g++ -c test02.cpp
host:~> g++ test01.cpp test02.o -lm -o test01
host:~> ./test01

It seems that the current Makefile generators do no recognize
"<SOURCES>" in a link command.

Thanks,
Eric.



More information about the CMake mailing list