<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
In order to maximize our ability to rebuild an exact copy of a
previous revision, our repository carries copies of numerous 3rd
party libraries.<br>
<br>
However, in most of their cases we are fairly selective about which
elements we build.<br>
<br>
Downside: "make clean && make" winds up rebuilding all the
damn libraries :)<br>
<br>
At the same time, we have a large number of customized project-wide
customizations, depending on which client / product version we're
building for. So, when we are building - as opposed to developing -
we need the ability to easily perform a full rebuild, including
possibly the libraries.<br>
<br>
For a nominal development "clean" build, upto 70% of the build time
is spent building 3rd party libraries.<br>
<br>
Right now - for simplicity - we actually assemble the 3rd libraries
from the top level CMakeLists.txt directly (ok, simplicity and a
failure on my part to work out how to express that "libraryXXX.a" is
an output of "subfolderX").<br>
<br>
/The problem/<br>
<br>
Something like a source-control revert can sometimes put <i>our</i>
part of the code base into a state that requires a clean. However,
we don't want to cause the libraries to rebuild <i>except</i> when
someone changes compilation flags or forces a rebuild of the
libraries somehow else (e.g. a "cleanall" target).<br>
<br>
Is there a way to do this with cmake? Or is this problem only
because I haven't (yet) split these libraries into their own
CMakeLists files?<br>
<br>
The simplest and therefore easiest complete example I have is:<br>
<br>
8x --- snip --- x8<br>
add_library(ircclient SHARED libircclient/src/libircclient.c)<br>
set_property(TARGET ircclient PROPERTY COMPILE_DEFINITIONS
IN_BUILDING_LIBIRC)<br>
link_directories( ${Project_BINARY_DIR}/ircclient )<br>
8x --- snip --- x8<br>
<br>
<br>
- Oliver<br>
<br>
</body>
</html>