[CMake] ExternalProject DEPENDS bug?

Pere Mato Vila Pere.Mato at cern.ch
Tue Jan 29 10:47:13 EST 2013


Hi,

  It seems that the DEPENDS option in the ExternalProejct_Add() requires an external project target and not any other kind of target.  In the page http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html says:

"The DEPENDS argument takes the names of other CMake targets that must build first before the current external project will build successfully. These could be library, executable target, external project, or CMake custom target names. ..."

The following CMake project fails to configure :

cmake_minimum_required(VERSION 2.8)
include(ExternalProject)
add_custom_target(PackA  COMMENT "PackA package already existing ")
ExternalProject_Add( PackB SOURCE_DIR . DEPENDS PackA )

with the error:

  External project "PackA" has no stamp_dir
Call Stack (most recent call first):
  /Volumes/Macintosh HD/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/ExternalProject.cmake:932 (ExternalProject_Get_Property)
  /Volumes/Macintosh HD/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/ExternalProject.cmake:1488 (_ep_get_step_stampfile)
  /Volumes/Macintosh HD/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/ExternalProject.cmake:1702 (_ep_add_configure_command)
  CMakeLists.txt:6 (ExternalProject_Add)

-- Configuring incomplete, errors occurred!


-------------------------------------------------------------
Pere Mato  CERN, PH Department, CH 1211 Geneva 23, Switzerland
          e-mail: pere.mato at cern.ch      tel: +41 22 76 78696
          fax:  +41 22 76 68792            gsm: +41 76 48 70855




More information about the CMake mailing list