MantisBT - CMake
View Issue Details
0015008CMakeCMakepublic2014-07-05 23:092015-01-05 08:39
Jean-Christophe Fillion-Robin 
Brad King 
normaltweakalways
closedfixed 
CMake 3.0 
CMake 3.0.1CMake 3.0.1 
0015008: Fix CMakeExpandImportedTargets to avoid Error on non-existent target in get_target_property.
CMake Warning (dev) at cmake/CMakeExpandImportedTargets.cmake:66 (get_target_property):
  Policy CMP0045 is not set: Error on non-existent target in
  get_target_property. Run "cmake --help-policy CMP0045" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.
No tags attached.
Issue History
2014-07-05 23:09Jean-Christophe Fillion-RobinNew Issue
2014-07-07 10:24Brad KingNote Added: 0036323
2014-07-07 10:51Jean-Christophe Fillion-RobinNote Added: 0036324
2014-07-07 11:00Brad KingNote Added: 0036325
2014-07-07 11:04Brad KingNote Added: 0036326
2014-07-07 11:04Brad KingAssigned To => Brad King
2014-07-07 11:04Brad KingStatusnew => assigned
2014-07-07 11:04Brad KingTarget Version => CMake 3.0.1
2014-07-07 11:04Brad KingDescription Updatedbug_revision_view_page.php?rev_id=1510#r1510
2014-07-14 15:22Brad KingStatusassigned => resolved
2014-07-14 15:22Brad KingResolutionopen => fixed
2014-07-14 15:22Brad KingFixed in Version => CMake 3.0.1
2014-07-14 15:22Brad KingDescription Updatedbug_revision_view_page.php?rev_id=1519#r1519
2015-01-05 08:39Robert MaynardNote Added: 0037585
2015-01-05 08:39Robert MaynardStatusresolved => closed

Notes
(0036323)
Brad King   
2014-07-07 10:24   
Where is "cmake/CMakeExpandImportedTargets.cmake"? The upstream CMake module is in "Modules/" and has no get_target_property call on line 66.
(0036324)
Jean-Christophe Fillion-Robin   
2014-07-07 10:51   
This is in CMake'ified CPython, since the minimum required CMake is 2.8.6 and that module has been integrated only after 2.8.7, we have our own copy.

See https://github.com/davidsansome/python-cmake-buildsystem/blob/master/cmake/CMakeExpandImportedTargets.cmake [^]
(0036325)
Brad King   
2014-07-07 11:00   
Okay, we can fix the equivalent line in the upstream copy of the module.

FYI, since 2.8.11 the module is not necessary:

 Handle targets in the LINK_LIBRARIES of try_compile.
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=236133e7 [^]
(0036326)
Brad King   
2014-07-07 11:04   
This should fix it:

 CMakeExpandImportedTargets: Do not read property on non-target
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=49f32168 [^]
(0037585)
Robert Maynard   
2015-01-05 08:39   
Closing resolved issues that have not been updated in more than 4 months