[CMake] libs only target
Jan Woetzel
jw at mip.informatik.uni-kiel.de
Fri Jun 2 03:15:47 EDT 2006
Brad King wrote:
> IF(BUILD_EXAMPLES)
Thanks Brad,
that's almost the approach we currently use except
IF (BUILD_EXAMPLES OR BUILD_TESTING)
for ctest ADD_TEST executable targets.
However,
we are not satisfied with this approach because:
(1) If someone has built only the libs and he decides he wants the
examples,
he has to run cmake to set BUILD_EXAMPLES (which takes time) which
creates/configures a new config.h (from config.in).
This config.h is included alomost everywhere and thus everything is
unneccessarily rebuilt.
So we prefer the approach of target:
- "all" build libs+executables,
- "libs" compiles+links all libraries but skips compiling+linking
executables.
I tried to create a "libs" target manually that depends on all libs od
the project.
This failed because the target names for the libraries are so different
between generators,compilersa and platforms (e.g. make, nmake, Visual
Studio).
Jan.
--
Dipl.-Ing. Jan Woetzel
--------------------------------------------------
University of Kiel
Institute of Computer Science and Applied Mathematics
Hermann-Rodewald-Str. 3 [room 310]
24098 Kiel/Germany
--------------------------------------------------
Phone +49-431-880-4477
Fax +49-431-880-4054
Mob. +49-179-2937346
--------------------------------------------------
Url www.mip.informatik.uni-kiel.de/~jw
Email jw at mip.informatik.uni-kiel.de
More information about the CMake
mailing list