[cmake-developers] [CMake 0011715]: FindPythonLibs: python_write_modules_header() write in source tree and fails silently

Mantis Bug Tracker mantis at public.kitware.com
Mon Jan 17 12:17:28 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11715 
====================================================================== 
Reported By:                Marcel Loose
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11715
Category:                   (No Category)
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-01-17 12:17 EST
Last Modified:              2011-01-17 12:17 EST
====================================================================== 
Summary:                    FindPythonLibs: python_write_modules_header() write
in source tree and fails silently
Description: 
The 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

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-17 12:17 Marcel Loose   New Issue                                    
======================================================================




More information about the cmake-developers mailing list