Is there a way to tell the CMake system that I don't want further compilation until the dependencies (external projects) are built and installed correctly?
Say a project depends on other libraries, which may or may not be present in the system. In case they're not, I use the ExternalProject_Add
to download and install it. Yet, even though the configure part goes fine, building the external project doesn't happen until you type make
. Now it doesn't make sense to compile the code if building the dependencies failed. I found in CMake ExternalProject_Add() and FindPackage() that maybe adding some dependencies would help, but that answer defines the dependency at configuration time, so it's not relevant to my situation.
Any ideas?