if( NOT EXISTS "${MY_SOURCE_DIR}/project/.git" )
message( SEND_ERROR "The git submodules are not available. Please run
git submodule update --init --recursive"
)
endif()


HTH

On 05/09/2012 02:52 PM, David Doria wrote:
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
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to