[CMake] Odd Happening

Brad King brad.king at kitware.com
Thu Jun 23 09:11:26 EDT 2005


mansoa at rpi.edu wrote:
> To Answer Brad King I make sure to delete the cache files beforehand.  For
> David Cole.  Say I have the two build trees c:\build1 and c:\build2 if I
> run cmake with c:\build1 as my current directory with a commandline of
> cmake -G"Visual Studio 7 .NET 2003" .\ it runs fine and what not.  But then
> copying just the cmake.lists files and nothing else to c:\build2 and
> deleting c:\build1 and then running the same commandline from c:\build2 as
> the current directory it will fail miserably.  Heres the error I am seeing
> more exactly.  I use the AUX_SOURCE_DIRECTORY(. PROJ1SOURCES) to get all
> the sources in folder c:\build2\project1\ and then it gets an error because
> all the files its reading in c:\build2\project1\ its trying to find in
> c:\build1\project1\
> 
> "CMAKE Error: can not find the file
> c:\pctools\applications\codeload\codeload.cpp"
> 
> However this was done from a root folder of C:\test2\  so it should be
> looking for the file in c:\test2\codeload\codeload.cpp.  I use no definite
> paths in any of the files only relative.

AUX_SOURCE_DIRECTORY is not meant to be used in this way.  Read its 
documentation.  You should list the source files explicitly.  If you 
must automatically collect them use the FILE command's GLOB option instead.

-Brad


More information about the CMake mailing list