[cmake-developers] [CMake 0015718]: wrong directory when making an out-of-source build

Mantis Bug Tracker mantis at public.kitware.com
Fri Aug 28 16:20:03 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15718 
====================================================================== 
Reported By:                benben
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15718
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-08-28 16:20 EDT
Last Modified:              2015-08-28 16:20 EDT
====================================================================== 
Summary:                    wrong directory when making an out-of-source build
Description: 
Trying to make an out-of-source build. It should build in the current working
directory. But instead, cmake puts everything in the directory in which the root
CMakeLists.txt is.

It is not the "subst" Issue from Bug 11153, I dont use subst.
(http://www.cmake.org/Bug/view.php?id=11153)

In the following "Steps To Reproduce" in line 1 the Prompt shows the current
directory:
D:\prj\cmake-try\1\_build
But the last line shows that writing was done to:
D:/prj/cmake-try/1

The "Additional Information" shows file-tree before/after.


Steps to Reproduce: 
D:\prj\cmake-try\1\_build>D:/Programme/cmake/bin/cmake.exe -G "MinGW Makefiles"
-D"CMAKE_MAKE_PROGRAM:PATH=D:/Programme/mingw/bin/make.exe" ../CMakeLists.txt

-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: D:/Programme/mingw/bin/gcc.exe
-- Check for working C compiler: D:/Programme/mingw/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: D:/Programme/mingw/bin/g++.exe
-- Check for working CXX compiler: D:/Programme/mingw/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: D:/prj/cmake-try/1


Additional Information: 
-- before: --

 Verzeichnis von D:\prj\cmake-try\1

28.08.2015  22:12    <DIR>          .
28.08.2015  22:12    <DIR>          ..
28.08.2015  21:52    <DIR>          _build
28.08.2015  22:12    <DIR>          Demo
28.08.2015  22:12    <DIR>          Hello
28.08.2015  21:09               502 CMakeLists.txt
               1 Datei(en),            502 Bytes

 Verzeichnis von D:\prj\cmake-try\1\Demo

28.08.2015  22:12    <DIR>          .
28.08.2015  22:12    <DIR>          ..
28.08.2015  21:12               413 CMakeLists.txt
28.08.2015  21:11               117 demo.cxx
28.08.2015  21:12                62 demo_b.cxx
               3 Datei(en),            592 Bytes

 Verzeichnis von D:\prj\cmake-try\1\Hello

28.08.2015  22:12    <DIR>          .
28.08.2015  22:12    <DIR>          ..
28.08.2015  21:10               386 CMakeLists.txt
28.08.2015  21:10                56 hello.cxx
               2 Datei(en),            442 Bytes

 Verzeichnis von D:\prj\cmake-try\1\_build

28.08.2015  21:52    <DIR>          .
28.08.2015  21:52    <DIR>          ..
               0 Datei(en),              0 Bytes

-- after: --

D:\prj\cmake-try\1\_build>dir /s/o ..
 Volume in Laufwerk D: hat keine Bezeichnung.
 Volumeseriennummer: 7032-57BD

 Verzeichnis von D:\prj\cmake-try\1

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  21:52    <DIR>          _build
28.08.2015  22:16    <DIR>          CMakeFiles
28.08.2015  22:16    <DIR>          Demo
28.08.2015  22:16    <DIR>          Hello
28.08.2015  22:16             1.484 cmake_install.cmake
28.08.2015  22:16            13.089 CMakeCache.txt
28.08.2015  21:09               502 CMakeLists.txt
28.08.2015  22:16             4.655 Makefile
               4 Datei(en),         19.730 Bytes

 Verzeichnis von D:\prj\cmake-try\1\CMakeFiles

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  22:16    <DIR>          3.3.1
28.08.2015  22:16    <DIR>          CMakeTmp
28.08.2015  22:16                86 cmake.check_cache
28.08.2015  22:16               628 CMakeDirectoryInformation.cmake
28.08.2015  22:16            34.355 CMakeOutput.log
28.08.2015  22:16            30.949 feature_tests.bin
28.08.2015  22:16            10.414 feature_tests.cxx
28.08.2015  22:16             7.935 Makefile.cmake
28.08.2015  22:16             5.662 Makefile2
28.08.2015  22:16                 3 progress.marks
28.08.2015  22:16                97 TargetDirectories.txt
               9 Datei(en),         90.129 Bytes

 Verzeichnis von D:\prj\cmake-try\1\CMakeFiles\3.3.1

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  22:16    <DIR>          CompilerIdC
28.08.2015  22:16    <DIR>          CompilerIdCXX
28.08.2015  22:16             1.845 CMakeCCompiler.cmake
28.08.2015  22:16             3.994 CMakeCXXCompiler.cmake
28.08.2015  22:16            28.925 CMakeDetermineCompilerABI_C.bin
28.08.2015  22:16            28.934 CMakeDetermineCompilerABI_CXX.bin
28.08.2015  22:16               244 CMakeRCCompiler.cmake
28.08.2015  22:16               367 CMakeSystem.cmake
               6 Datei(en),         64.309 Bytes

 Verzeichnis von D:\prj\cmake-try\1\CMakeFiles\3.3.1\CompilerIdC

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  22:16            28.996 a.exe
28.08.2015  22:16            15.862 CMakeCCompilerId.c
               2 Datei(en),         44.858 Bytes

 Verzeichnis von D:\prj\cmake-try\1\CMakeFiles\3.3.1\CompilerIdCXX

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  22:16            29.024 a.exe
28.08.2015  22:16            15.878 CMakeCXXCompilerId.cpp
               2 Datei(en),         44.902 Bytes

 Verzeichnis von D:\prj\cmake-try\1\CMakeFiles\CMakeTmp

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
               0 Datei(en),              0 Bytes

 Verzeichnis von D:\prj\cmake-try\1\Demo

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  22:16    <DIR>          CMakeFiles
28.08.2015  22:16               886 cmake_install.cmake
28.08.2015  21:12               413 CMakeLists.txt
28.08.2015  21:11               117 demo.cxx
28.08.2015  21:12                62 demo_b.cxx
28.08.2015  22:16             6.169 Makefile
               5 Datei(en),          7.647 Bytes

 Verzeichnis von D:\prj\cmake-try\1\Demo\CMakeFiles

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  22:16    <DIR>          helloDemo.dir
28.08.2015  22:16               628 CMakeDirectoryInformation.cmake
28.08.2015  22:16                 3 progress.marks
               2 Datei(en),            631 Bytes

 Verzeichnis von D:\prj\cmake-try\1\Demo\CMakeFiles\helloDemo.dir

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  22:16             7.124 build.make
28.08.2015  22:16               363 cmake_clean.cmake
28.08.2015  22:16                95 depend.make
28.08.2015  22:16               688 DependInfo.cmake
28.08.2015  22:16               232 flags.make
28.08.2015  22:16                29 includes_CXX.rsp
28.08.2015  22:16               449 link.txt
28.08.2015  22:16               120 linklibs.rsp
28.08.2015  22:16                79 objects1.rsp
28.08.2015  22:16                68 progress.make
              10 Datei(en),          9.247 Bytes

 Verzeichnis von D:\prj\cmake-try\1\Hello

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  22:16    <DIR>          CMakeFiles
28.08.2015  22:16               887 cmake_install.cmake
28.08.2015  21:10               386 CMakeLists.txt
28.08.2015  21:10                56 hello.cxx
28.08.2015  22:16             5.312 Makefile
               4 Datei(en),          6.641 Bytes

 Verzeichnis von D:\prj\cmake-try\1\Hello\CMakeFiles

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  22:16    <DIR>          Hello.dir
28.08.2015  22:16               628 CMakeDirectoryInformation.cmake
28.08.2015  22:16                 3 progress.marks
               2 Datei(en),            631 Bytes

 Verzeichnis von D:\prj\cmake-try\1\Hello\CMakeFiles\Hello.dir

28.08.2015  22:16    <DIR>          .
28.08.2015  22:16    <DIR>          ..
28.08.2015  22:16             4.837 build.make
28.08.2015  22:16               255 cmake_clean.cmake
28.08.2015  22:16                40 cmake_clean_target.cmake
28.08.2015  22:16                91 depend.make
28.08.2015  22:16               514 DependInfo.cmake
28.08.2015  22:16               228 flags.make
28.08.2015  22:16                29 includes_CXX.rsp
28.08.2015  22:16               127 link.txt
28.08.2015  22:16                46 progress.make
               9 Datei(en),          6.167 Bytes

 Verzeichnis von D:\prj\cmake-try\1\_build

28.08.2015  21:52    <DIR>          .
28.08.2015  21:52    <DIR>          ..
               0 Datei(en),              0 Bytes


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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-08-28 16:20 benben         New Issue                                    
======================================================================



More information about the cmake-developers mailing list