View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013849CMakeCMakepublic2013-01-15 09:492013-06-03 09:05
ReporterIvan Bednyakov 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformIntel Core I5 CPUOSMS Windows 7 OS Versionx64 Pro
Product VersionCMake 2.8.10.2 
Target VersionCMake 2.8.11Fixed in VersionCMake 2.8.11 
Summary0013849: ExternalProject_Add works in a wrong way for DEPENDS property
DescriptionIt should be noticed that at the version 2.8.8 this error didn't appear.
Trying to add dependencies to an ExternalProject brings me to the error like

-External project "MyDependencyLibrary" has no stamp_dir

Actually I have the following CMakeLists tree:
1). A main one, where I declaring targets like IMPORTED libraries (to the libs produced by "MyExternalProject"), etc. and where I have 2 calls to ADD_SUBDIRECTORY(...);
2). A Leaf 1, where ADD_LIBRARY( MyDependencyLibrary ...) exists, defining some target "MyDependencyLibrary";
3). A Leaf 2, where ExternalProject_Add( MyExternalProject DEPENDS MyDependencyLibrary ...) exists;

In such a building tree I get the mentioned above error. At the earlier version (CMake-2.8.8) all was Ok!
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0032104)
Brad King (manager)
2013-01-15 10:14

The change was introduced in CMake 2.8.9 by this commit:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d14c0243 [^]

In this hunk:

   # Depend on other external projects (file-level).
   set(file_deps)
   get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
   foreach(dep IN LISTS deps)
-    get_property(dep_stamp_dir TARGET ${dep} PROPERTY _EP_STAMP_DIR)
-    list(APPEND file_deps ${dep_stamp_dir}${cfgdir}/${dep}-done)
+    _ep_get_step_stampfile(${dep} "done" done_stamp_file)
+    list(APPEND file_deps ${done_stamp_file})
   endforeach()


the use of _ep_get_step_stampfile enforces the presence of the _EP_STAMP_DIR on the target with the error message you see.

However, the old code blindly accepted an empty string when the property does not exist, and results in a build-time error about the missing stamp file.
(0032105)
Brad King (manager)
2013-01-15 10:16

In order to make an ExternalProject target depend on a library target, just use

 ExternalProject_Add(MyExternalProject ...)
 add_dependencies(MyExternalProject MyDependencyLibrary)

This will add the build-order dependency.
(0032108)
Ivan Bednyakov (reporter)
2013-01-16 04:08

Thank you for the reply. I saw this difference in the ExternalProject module (but probably didn't analize it at all :))).
The main reason of creating the bug report is that my project with some dependencies (included via ExternalProject_Add) has been built fine at CMake-2.8.8 but at some other machine with the newer CMake (2.8.10) it cannot be built.
The mentioned solution actually solved the problem.
Thank you!
(0032109)
Brad King (manager)
2013-01-16 10:01
edited on: 2013-01-16 10:36

Fixed:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c0f1af92 [^]

(0033187)
Robert Maynard (manager)
2013-06-03 09:05

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-01-15 09:49 Ivan Bednyakov New Issue
2013-01-15 10:14 Brad King Note Added: 0032104
2013-01-15 10:16 Brad King Note Added: 0032105
2013-01-16 04:08 Ivan Bednyakov Note Added: 0032108
2013-01-16 10:01 Brad King Note Added: 0032109
2013-01-16 10:01 Brad King Assigned To => Brad King
2013-01-16 10:01 Brad King Severity major => minor
2013-01-16 10:01 Brad King Status new => resolved
2013-01-16 10:01 Brad King Resolution open => fixed
2013-01-16 10:01 Brad King Fixed in Version => CMake 2.8.11
2013-01-16 10:01 Brad King Target Version => CMake 2.8.11
2013-01-16 10:36 Brad King Note Edited: 0032109
2013-06-03 09:05 Robert Maynard Note Added: 0033187
2013-06-03 09:05 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team