The following issue has been SUBMITTED. 
====================================================================== 
http://www.itk.org/Bug/view.php?id=15032 
====================================================================== 
Reported By:                Gerald Hofmann
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15032
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-07-22 09:43 EDT
Last Modified:              2014-07-22 09:43 EDT
====================================================================== 
Summary:                    Binary and source path not handled properly if path
does not contain a sub-directory but "drive letter" only
Description: 
If building in a binary directory that is on root level of a "drive letter" the
binary path name is not handled properly.

Src directory handling also affected, but workaround available.

Steps to Reproduce: 
- Open terminal and cd to a root level build directory (e.g. network share
mapped to a server based platform specific build dir)

- Issue "cmake-gui s:" (assuming s: points to the src dir) 

- Find binary dir  preset with training backslash. src dir has no training
backslash.

- Re-select src directory from "browse source" and find the training backslash
added

First error occourence:
=======================

- Try to configure for any generator. 

CMake Error at s://CMakeLists.txt:42 (add_subdirectory):
  add_subdirectory not given a binary directory but the given source
  directory "s:/foo" is not a subdirectory of "s:/".

=> Looks strange. Error message is not correct. All dirs are in place.

- Apply work-around by removing training backslash in source directory (keep it
for the bin directory)

- Re-configure -> works

Extended error occourence:
==========================

- Removing the backslash from src dir seemingly works. Run generate.

- Find Makefile not working

- Makefiles containing wrong build targets

# The main all target
all: cmake_check_build_system
        $(CMAKE_COMMAND) -E cmake_progress_start U:\CMakeFiles
U:\CMakeFiles\progress.marks
        $(MAKE) -f CMakeFiles\Makefile2 /nologo -$(MAKEFLAGS) U:\\all
        $(CMAKE_COMMAND) -E cmake_progress_start U:\CMakeFiles 0
.PHONY : all

=> "all" target is prefixed by the binary dir drive letter. Makefile is not
usable. Manually removing the "U:\\" prefix from the target name will fix the
Makefile. All other entries seem to be correct.

 

Additional Information: 
Probably introduced in late 2.8.x releases
Worked in 2.8.2, found during update to 2.8.12 / 3.0.0

Workaround: Always use subdirectory for the binary dir. Make sure there is no
training slash in src and bin directory entry.

Probable explanation: Path names are not split up properly. cmake seems to
expext *no training slash* for src/bin path names (GUI or cl). If selected dir
is on root level, internal splitting fails, probably because the parser is
looking for a backslash to separate drive letter and relative bin path
components. Adding a trailing slash will cure configure stage processing, but
bin directory handling is broken by this "enforced" parsing.


*** Windoze console path names == root of all evil.... ***
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-07-22 09:43 Gerald Hofmann New Issue                                    
======================================================================

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Reply via email to