MantisBT - CMake
View Issue Details
0011675CMakeModulespublic2011-01-10 11:562011-05-02 14:46
Markus Elfring 
David Cole 
normalmajoralways
closedfixed 
openSUSE 11.3Linux2.6.37
 
CMake 2.8.3 
0011675: Variable "CMAKE_CURRENT_LIST_DIR" seems to be empty. ⇒ include command fails
I stumbled on a "CMake Error" which did not let me properly configure an other software project. I have hoped to circumvent this open issue with a software update.
I have loaded your package "http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz". [^] I have enabled desired options with the tool "CMake-GUI 2.8.1". Now I would like to configure it, too.
But I was surprised by the message "Error in configuration process, project files may be invalid" in a dialogue box.
The log area displays the following informations:
Using system-installed BZIP2
Using system-installed CURL
Using system-installed EXPAT
Using system-installed LIBARCHIVE
Using system-installed ZLIB
*****/FindPackageHandleStandardArgs.cmake
CMake Error at Modules/FindLibArchive.cmake:54 (include):
  include could not find load file:

    /FindPackageHandleStandardArgs.cmake
Call Stack (most recent call first):
  CMakeLists.txt:326 (INCLUDE)
  CMakeLists.txt:522 (CMAKE_BUILD_UTILITIES)


*****
Configuring incomplete, errors occurred!


I added two lines (with the star markers) for debug output to the corresponding script. Now I doubt that an empty variable "CMAKE_CURRENT_LIST_DIR" is the expected behaviour. How will this issue be resolved?
No tags attached.
zip CMakeCache.txt.zip (13,221) 2011-01-10 11:56
https://public.kitware.com/Bug/file/3611/CMakeCache.txt.zip
Issue History
2011-01-10 11:56Markus ElfringNew Issue
2011-01-10 11:56Markus ElfringFile Added: CMakeCache.txt.zip
2011-01-10 12:40Markus ElfringNote Added: 0024537
2011-01-14 17:14Ben BoeckelNote Added: 0024695
2011-01-15 03:25Markus ElfringNote Added: 0024705
2011-01-17 11:54David ColeAssigned To => David Cole
2011-01-17 11:54David ColeStatusnew => assigned
2011-01-17 12:03David ColeNote Added: 0024766
2011-01-17 12:03David ColeStatusassigned => resolved
2011-01-17 12:03David ColeFixed in Version => CMake 2.8.3
2011-01-17 12:03David ColeResolutionopen => fixed
2011-05-02 14:45David ColeNote Added: 0026342
2011-05-02 14:46David ColeStatusresolved => closed

Notes
(0024537)
Markus Elfring   
2011-01-10 12:40   
The tried configuration and generation works as expected by the graphical user interface from the package "http://www.cmake.org/files/v2.8/cmake-2.8.3-Linux-i386.sh". [^]
(0024695)
Ben Boeckel   
2011-01-14 17:14   
Hmm. The module is using CMAKE_CURRENT_LIST_DIR but this was introduced after 2.8.1. I don't think that we want to try supporting building cmake with extremely old versions of cmake for all time. I would recommend using the included bootstrap script to build 2.8.x from scratch.
(0024705)
Markus Elfring   
2011-01-15 03:25   
I found a bit of background information in an answer by David Cole for the topic "How to find the path to the currently include() or find_package file()".
http://permalink.gmane.org/gmane.comp.programming.tools.cmake.user/33678 [^]

I am surprised that a currently released executable/script file is needed for the selected configuration options to build it from the corresponding source files.
Are any additional version checks needed to resolve the involved software dependencies?
http://cmake.org/Wiki/CMake_Useful_Variables [^]
(0024766)
David Cole   
2011-01-17 12:03   
This issue is resolved already in CMake 2.8.3 -- (that is, if you use CMake 2.8.3 to build it, then it does have a non-empty CMAKE_CURRENT_LIST_DIR, and all is well)

It's a sordid story, really, involving the bug fix for 0009414 and its long and still evolving aftermath.

The bottom line is we never should have changed the signature of the main function in FindPackageHandleStandardArgs, but we did, and this is one of the negative consequences from it.

But it is fixed already if you use the latest release of CMake.
(0026342)
David Cole   
2011-05-02 14:45   
Closing resolved issues that have not been updated in more than 3 months.