MantisBT - CMake
View Issue Details
0015134CMakeCMakepublic2014-09-08 02:472016-06-10 14:31
Mattes D 
Kitware Robot 
normalminoralways
closedmoved 
WindowsWindows XP5.1
CMake 2.8.12.1 
 
0015134: add_subdirectory() fails when CMakeLists.txt in drive root
I'm using the "subst" command on windows to make my build folder the root of a separate drive. Thus, the cmake file being processed is called "N:\CMakeLists.txt". CMake then fails to process the file, with several errors, all following the pattern:

CMake Error at N://CMakeLists.txt:66 (add_subdirectory):
  add_subdirectory not given a binary directory but the given source
  directory "N:/lib/jsoncpp" is not a subdirectory of "N:/". When specifying
  an out-of-tree source a binary directory must be explicitly specified.

CMake Error at N://CMakeLists.txt:76 (get_property):
  get_property DIRECTORY scope provided but requested directory was not
  found. This could be because the directory argument was invalid or, it is
  valid but has not been processed yet.

The very same cmake file, when used in a subfolder, works without a problem.
For your reference, the CMakeLists.txt file being used is this one:
https://github.com/mc-server/MCServer/blob/562b2d1d1de7438bc763d778b56b0743affd1b5b/CMakeLists.txt [^]
Cmake is being called as:
cmake -G "Visual Studio 9 2008" .
Use subst to map a folder containing a project to a separate drive letter. Then use CMake in that drive's root to configure the project. CMake fails with the specified error.
No tags attached.
Issue History
2014-09-08 02:47Mattes DNew Issue
2016-06-10 14:29Kitware RobotNote Added: 0042624
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042624)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.