[CMake] Copying directories and build error

Bill Hoffman bill.hoffman at kitware.com
Thu Sep 4 10:57:18 EDT 2008


Bo Huang wrote:
> After running CMake to generate Visual Studio project files, I made a 
> copy of
> 
>  
> 
> C:\myProj
> 
>  
> 
> to
> 
>  
> 
> C:\myProjCopy
> 
>  
> 
> In this copy, I change all references of “C:\myProj” to “C:\myProjCopy” 
> in all .cmake, .txt, and other files. I build but get this:
> 
>  
> 
>  1>Checking Build System
> 
> 1>CMake is re-running because CMakeFiles/generate.stamp is out-of-date.
> 
> 1>     CMake Error: The source "/myProjCopy/CMakeLists.txt" does not 
> match the source "/myProj/CMakeLists.txt" used to generate cache.  
> Re-run cmake with a different source directory.
> 
>  
> 
>  
> 
> My motivation to create a copy is to avoid running CMake again. How do I 
> get around this?
> 
>  

You don't CMake does not support the relocation of build trees.

-Bill


More information about the CMake mailing list