[CMake] ExternalProject_add and add_subdirectory in one step

Franz Engel franz.engel at apworks.de
Thu Feb 5 11:32:06 EST 2015


Hi,

I try to clone an repository from my bare-repository and to build my project tree. Therefore I use the following commands:

ExternalProject_Add ( demoA
       PREFIX ${MAIN_PATH}/demoA
       GIT_REPOSITORY ${REPOSITORY_PATH}/demoA
       GIT_TAG origin/master
       UPDATE_COMMAND ""
       INSTALL_COMMAND "" )

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../demoA/src/DemoA ${CMAKE_CURRENT_SOURCE_DIR}/demoA)

Know I have the following problem. I load the Cmake-file with QtCreator. If I run CMake I get the error message "does not contain a CMakeLists.txt file". That message is clear for me, because the repository only get loaded when I compile the code. The question is, if it is possible to clone the repo in the step of CMake. Does somebody has an idea? Or is there another method to build the project tree?

Br,
    Franz

_______________________________________
 
Franz Engel

AIRBUS APWORKS GmbH
81663 Munich - Germany 
T: +49 (0) 89 607 29103   
M: +49 (0) 170 44 59 006  
franz.engel at apworks.de 

AIRBUS APWORKS GmbH
Registered Office: Ottobrunn
District Court of Munich: HRB 141734
Managing Director: Joachim Zettler
Internet: www.apworks.de
_______________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150205/fec10352/attachment-0001.html>


More information about the CMake mailing list