[CMake] [2.4.7] - ADD_SUBDIRECTORY unexpected behavior

David Blado dblado at decarta.com
Mon Aug 6 16:24:38 EDT 2007


Hi Bill,

Yes, this worked fine in 2.4.6.

I would think that the case sensitivity would only cause a problem on
Unix since Windows is case insensitive.

I'm not sure where to specify or why cmake is using 'C' for one of the
paths and 'c' for the other.

I am setting: SET(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) so yes,
the binary directory is empty.  I also went so far as to completely
remove the source dir and do a fresh checkout of the tree.

I went through my script and changed all occurrences of 'c:' to 'C:' and
that seems to have solved the problem.  I don't understand why I can't
use lowercase 'c'.  I didn't have to change any CMakeList.txt files to
solve this...just changing the script that launches ctest from:
cd c:\x\y\z to cd C:\x\y\z did the trick.

Thanks,
David

-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com] 
Sent: Monday, August 06, 2007 12:20 PM
To: David Blado
Cc: cmake at cmake.org
Subject: Re: [CMake] [2.4.7] - ADD_SUBDIRECTORY unexpected behavior

David Blado wrote:
>
> Hi All,
>
> After upgrading to cmake/ctest 2.4.7, I started experiencing the 
> following problems when running my automated builds using ctest:
>
> c:/builds/dds4.2.3/dds/CMakeLists.txt:6:
>
> ADD_SUBDIRECTORY not given a binary directory but the given source 
> directory "C:/builds/dds4.2.3/dds/Accounting" is not a subdirectory of

> "c:/builds/dds4.2.3/dds". When specifying an out-of-tree source a 
> binary directory must be explicitly specified.
>
> I can assure you that C:/builds/dds4.2.3/dds/Accounting" is absolutely

> a subdirectory of C:/builds/dds4.2.3/dds".
>
> I am able to run cmake from the command line and load the solution 
> file just fine. This product is also built on a variety of unix 
> platforms that are using cmake 2.4.7 as well. The unix platforms build

> just fine from the command line and from ctest.
>
> I'm guessing that this is a bug, but wanted to get some community 
> feedback before submitting a bug report.
>
> Cheers,
>
> David
>
So, this worked with 2.4.6?

The problem is the C: vs c:, note the case....

-Bill


More information about the CMake mailing list