[CMake] Checking if git submodules have been initialized

David Doria daviddoria at gmail.com
Wed May 9 08:52:04 EDT 2012


I have recently started using git submodules in my projects. I have
had multiple complains from my users "It gives me a "missing xyz.h"
type of error when I try to compile." The reason is that they haven't
initialized the submodules (like it says to do in the readme :) ). Is
there a CMake way to check if a submodule is initialized so I can
throw a more appropriate error - "Please initialize the xyz submodule"
instead of letting the error get all the way to the compiler?

Thanks,

David


More information about the CMake mailing list