[CMake] Building files with custom target
Pablo Yanez Trujillo
shaoran at sakuranohana.org
Fri Nov 28 08:55:10 EST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
> Is that more what you were looking for?
not excactly
> If you want to build the tcp_server sample only then "make tcp_server".
I know that. The problem is that when you use add_executable then the target is automatically a dependency of the 'all'
target. I mean:
# CMakeLists.txt
add_executable(someexec ${SOMEEXEC_SRC})
target_link_libraries(seomeexec dep1 dep2 dep3 ...)
# EOF
If you type:
$ make
then the all target is executed and make builds 'someexec' and its dependencies. I want 'someexec' not to be a
dependency of the 'all' target so if I type
$ make
then the someexec target won't be built. Only when I type
$ make someexec
the 'someexec' target should be built.
What I need is something like a ADD_CUSTOM_TARGET but where the build-proc. and dependencies tracking is still done by
cmake. I hope I've explained clearly what I'm looking for ;)
Thanks
Pablo
Michael Jackson wrote:
> Ok. Say your main target is FooServer, then you can do "make FooServer"
> and only FooServer" will be built (plus anything that FooServer Depends
> on).
>
> If you want to build the tcp_server sample only then "make tcp_server".
>
> Is that more what you were looking for?
>
>
> Mike
>
>
- --
- --
Pablo Yanez Trujillo
http://klingsor.informatik.uni-freiburg.de
My public key: http://klingsor.informatik.uni-freiburg.de/gpg/supertux.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkkv+D4ACgkQDzf8xo+0xRWy2wCfXy++axXtQzFsEuTJvwDRaOVU
H4UAnReUDV/z4gDjM4lQvsDsFjZR9PdJ
=HTV6
-----END PGP SIGNATURE-----
More information about the CMake
mailing list