Consider replace this:

macro(generate_submodule_library name submodule_dir extra_cxxflags extra_linkflags)

to:

macro(generate_submodule_library name <b>remote commitish</b> submodule_dir extra_cxxflags extra_linkflags)