MantisBT - CMake
View Issue Details
0013495CMakeCMakepublic2012-08-28 10:472013-03-04 08:38
Nils Gladitz 
Peter Kuemmel 
normalminoralways
closedfixed 
CMake 2.8.9 
CMake 2.8.10CMake 2.8.10 
0013495: Ninja generator creates directory hierarchy in working directory (not build directory)
When running "Generate" from the cmake-gui with the Ninja generator a directory hierarchy is created in the current working directory rather than CMAKE_BINARY_DIR.

This is I guess more likely on windows when you start cmake-gui via e.g. a shortcut and then configure source and binary directories rather than run cmake/cmake-gui from inside a manually created binary directory.
No tags attached.
Issue History
2012-08-28 10:47Nils GladitzNew Issue
2012-08-29 01:05ClausKleinNote Added: 0030791
2012-08-29 01:08ClausKleinNote Edited: 0030791bug_revision_view_page.php?bugnote_id=30791#r795
2012-08-29 02:28Nils GladitzNote Added: 0030792
2012-08-31 01:01ClausKleinNote Added: 0030801
2012-08-31 01:05ClausKleinNote Edited: 0030801bug_revision_view_page.php?bugnote_id=30801#r797
2012-08-31 01:06ClausKleinNote Edited: 0030801bug_revision_view_page.php?bugnote_id=30801#r798
2012-08-31 01:08ClausKleinNote Edited: 0030801bug_revision_view_page.php?bugnote_id=30801#r799
2012-08-31 01:48Nils GladitzNote Added: 0030802
2012-08-31 16:01ClausKleinNote Added: 0030814
2012-08-31 16:35Nils GladitzNote Added: 0030815
2012-10-03 10:27Peter KuemmelAssigned To => Peter Kuemmel
2012-10-03 10:27Peter KuemmelStatusnew => assigned
2012-10-03 10:32Peter KuemmelNote Added: 0031164
2012-10-03 10:32Peter KuemmelStatusassigned => resolved
2012-10-03 10:32Peter KuemmelFixed in Version => CMake 2.8.10
2012-10-03 10:32Peter KuemmelResolutionopen => fixed
2012-10-24 17:28David ColeTarget Version => CMake 2.8.10
2013-03-04 08:38Robert MaynardNote Added: 0032485
2013-03-04 08:38Robert MaynardStatusresolved => closed

Notes
(0030791)
ClausKlein   
2012-08-29 01:05   
(edited on: 2012-08-29 01:08)
on which os, which generator, which tools, ...?
Which files or directories are create at source dir?

Please describe how to reproduce this issue!

(0030792)
Nils Gladitz   
2012-08-29 02:28   
@ClausKlein: I'll try to reduce this to simple instructions:
- On your favorite OS with CMake 2.8.9 and Ninja installed and in your path open a command line.
- create a new directory and change into it (this is your working directory)
- run "cmake-gui" from your working directory
- under "Where is the source code:" add a valid location to a CMake project of your choice.
- under "Where to build the binaries:" enter a non-existing location (distinct from your working or source directory) where you want the binaries to end up
- press "Generate", confirm that you want the build directory to be created, select "Ninja" from the list of generators and press "Finish"
- wait for it to complete then confirm that your working directory contains new sub-directories which should not have been created here (e.g. "CMakeFiles")
(0030801)
ClausKlein   
2012-08-31 01:01   
(edited on: 2012-08-31 01:08)
With my favorite OS ;) MAC OS X (leopard) cmake-gui programm fails if I use it in than way:

claus-kleins-macbook-pro:ftplib clausklein$ cmake-gui -G Ninja /Users/clausklein/Workspace/cpp/ftplibpp-2.0.2-ck
claus-kleins-macbook-pro:ftplib clausklein$ ls -lrta
total 12
drwxr-xr-x 7 clausklein wheel 238 Aug 30 23:19 ..
-rw-r--r-- 1 clausklein wheel 10825 Aug 31 06:57 CMakeCache.txt
drwxr-xr-x 4 clausklein wheel 136 Aug 31 06:57 .
drwxr-xr-x 8 clausklein wheel 272 Aug 31 06:57 CMakeFiles

But if i start cmake instead, it works:

claus-kleins-macbook-pro:ftplib clausklein$ cmake -G Ninja /Users/clausklein/Workspace/cpp/ftplibpp-2.0.2-ck
-- use ccache
-- The CXX compiler identification is GNU 4.7.1
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - no
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - no
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /var/tmp/workspace/ftplib
claus-kleins-macbook-pro:ftplib clausklein$ ls -lrta
total 32
drwxr-xr-x 7 clausklein wheel 238 Aug 30 23:19 ..
-rw-r--r-- 1 clausklein wheel 3056 Aug 31 06:58 rules.ninja
drwxr-xr-x 2 clausklein wheel 68 Aug 31 06:58 lib
-rw-r--r-- 1 clausklein wheel 3849 Aug 31 06:58 cmake_install.cmake
-rw-r--r-- 1 clausklein wheel 12257 Aug 31 06:58 build.ninja
drwxr-xr-x 2 clausklein wheel 68 Aug 31 06:58 bin
drwxr-xr-x 15 clausklein wheel 510 Aug 31 06:58 CMakeFiles
-rw-r--r-- 1 clausklein wheel 10959 Aug 31 06:58 CMakeCache.txt
drwxr-xr-x 9 clausklein wheel 306 Aug 31 06:58 .
claus-kleins-macbook-pro:ftplib clausklein$

In both cases, there is no file created at source dir!

(0030802)
Nils Gladitz   
2012-08-31 01:48   
@ClausKlein: You have to call cmake-gui without parameters.
You can configure the generator and the source and build directory inside the GUI.

You will not be able to reproduce it with "cmake" unless there is a way to have distinct build and working directories with it as well (if there is I don't know of it).

The bug report is not about files being created in the source directory but rather directories being created in the working directory.
(0030814)
ClausKlein   
2012-08-31 16:01   
it does not work, cmake errors!
But to files at current dir:


claus-kleins-macbook-pro:ftplib clausklein$ cmake-gui
claus-kleins-macbook-pro:ftplib clausklein$ ls -lrta
total 0
drwxr-xr-x 2 clausklein wheel 68 Aug 31 21:56 .
drwxr-xr-x 8 clausklein wheel 272 Aug 31 21:58 ..
claus-kleins-macbook-pro:ftplib clausklein$
(0030815)
Nils Gladitz   
2012-08-31 16:35   
@ClausKlein: Hard to diagnose without seeing the errors but I'm assuming that your issues with cmake-gui are probably unrelated to this specific report since even though directories are created in the wrong location this does not result in a cmake failure for me.
(0031164)
Peter Kuemmel   
2012-10-03 10:32   
http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=dd7130ae6dd582b3f5a34841021dfa4989ef57a0 [^]
(0032485)
Robert Maynard   
2013-03-04 08:38   
Closing resolved issues that have not been updated in more than 4 months.