View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011715CMakeModulespublic2011-01-17 12:172011-05-02 14:46
ReporterMarcel Loose 
Assigned ToMarcus D. Hanwell 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 2.8.3 
Target VersionCMake 2.8.4Fixed in VersionCMake 2.8.4 
Summary0011715: FindPythonLibs: python_write_modules_header() write in source tree and fails silently
DescriptionThe function python_write_modules_header() generates a file in the source tree, because the filename supplied to FILE(WRITE ...) is not absolute. Then the "copy_if_different" command further down fails silently (I guess because it cannot find the input file).
Steps To Reproduce$ cat << EOF > CMakeLists.txt
cmake_minimum_required(VERSION 2.6)
project(MyPython)
find_package(PythonLibs)
python_add_module(pyfoo pyfoo.cc)
python_write_modules_header(mypython.h)
EOF

$ touch pyfoo.cc
$ mkdir build
$ cd build
$ cmake ..
$ ls ..
build CMakeLists.txt mypython.h.in pyfoo.cc
TagsNo tags attached.
Attached Filespatch file icon FindPythonLibs.cmake.patch [^] (565 bytes) 2011-01-17 12:19 [Show Content]

 Relationships

  Notes
(0024770)
Marcel Loose (developer)
2011-01-17 12:19

I've uploaded a patch that fixes this issue.
(0024802)
Marcus D. Hanwell (developer)
2011-01-17 15:33

Looks good to me, I have staged and merged the patch to next,

23635ff Bug 0011715 - generate header in the build tree.

I will see if this can be merged in for the 2.8.4 release.
(0026370)
David Cole (manager)
2011-05-02 14:46

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

 Issue History
Date Modified Username Field Change
2011-01-17 12:17 Marcel Loose New Issue
2011-01-17 12:19 Marcel Loose File Added: FindPythonLibs.cmake.patch
2011-01-17 12:19 Marcel Loose Note Added: 0024770
2011-01-17 13:38 Brad King Assigned To => Marcus D. Hanwell
2011-01-17 13:38 Brad King Status new => assigned
2011-01-17 15:33 Marcus D. Hanwell Note Added: 0024802
2011-01-18 14:19 David Cole Category (No Category) => Modules
2011-01-20 08:15 David Cole Target Version => CMake 2.8.4
2011-01-20 08:15 David Cole Status assigned => resolved
2011-01-20 08:15 David Cole Fixed in Version => CMake 2.8.4
2011-01-20 08:15 David Cole Resolution open => fixed
2011-05-02 14:46 David Cole Note Added: 0026370
2011-05-02 14:46 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team