After much agony, I've successfully arranged for my CMake project to use some library via ExternalProject. I cmake, I make, it works - life is good.
However, if I make again, it performs the Update and Install steps for the external project. I definitely do not want this to happen. How do I prevent this?
While the way you proposed in your own answer has the same effect, the actual option you might want to use for that is
UPDATE_DISCONNECTED.From CMake's documentation, under the section Update/patch options:
UPDATE_DISCONNECTED <bool>So your final thing could look like the following:
If you go a bit further down the excerpt I quoted though, the documentation explicitly advises against doing this and recommends controlling the update behaviour through a directory variable
EP_UPDATE_DISCONNECTED, whose value is used as the default value forUPDATE_DISCONNECTED.This means you can keep your
ExternalProject_Addcall free of theUPDATE_DISCONNECTEDoption, and instead run your CMake command like so: