2011/6/3 Jean-Christophe Fillion-Robin <jchris.filli...@kitware.com>: > Just tested it on linux and the same remark applies.
Hi, I cannot find the answer in the ML archive but I think I already crossed that issue in the past and I was answered that this was the expected "legacy CMake" behavior. 1) When you specify a directory path then CMake assume this is a "source dir" and will use the current directory as build dir. 2) When you specify a CMakeLists.txt file it will consider you want to build in the directory where the CMakeLists.txt is. in CMake source one read (see: Source/cmake.cxx:791): if(argIsFile) { // Source CMakeLists.txt file given. It was probably dropped // onto the executable in a GUI. Default to an in-source build. this->SetHomeOutputDirectory(listPath.c_str()); this->SetStartOutputDirectory(listPath.c_str()); } else { // Source directory given on command line. Use current working // directory as build tree. std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); this->SetHomeOutputDirectory(cwd.c_str()); this->SetStartOutputDirectory(cwd.c_str()); } So I bet this is purposely done, even if this may be an unexpected behavior in the first place. I don't know the rational for that (beside maintaining some legacy behavior) but may be someone at kitware is old enough to explain that :-] -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ 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://www.cmake.org/mailman/listinfo/cmake