Hi,

in ccmake, cmake::GetCMakeCommand() returns a wrong path when ccmake was 
invoked from the PATH.
CMakeCommand is in ccmake computed this way (in cmCursesMainForm.cxx):

 std::string whereCMake=cmSystemTools::GetProgramPath(this->Args[0].c_str());
 whereCMake += "/cmake";
 ...
 this->CMakeInstance->SetCMakeCommand(whereCMake.c_str());

Now if this->Args[0] is simply "ccmake", then whereCMake becomes "/cmake", 
which is wrong.

What would be the right way to fix this ?
Check whether whereCMake is empty, and only add the "/" if it is not empty ?

Set it to GetDefinition("CMAKE_COMMAND"), which is set if I see correctly in 
cmake::AddCMakePaths(), which seems to always set the full path ?

Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to