[CMake] How to force cmake to run on a different source directory?

Peng Yu pengyu.ut at gmail.com
Mon Aug 13 15:48:21 EDT 2012


Hi,

The following directory has 'cmake ../src1' run before. I get the
following error when I run the following command. One way to solve the
problem is to run "rm -rf *", but I'm wondering if there is a way to
force cmake to run even when the source directory changes. I don't see
such a command line option in the manual. Thanks!

~/linux/test/cmake/lang/command/message/build$ cmake ../src/
CMake Error: The source
"/Users/pengy/linux/test/cmake/lang/command/message/src/CMakeLists.txt"
does not match the source
"/Users/pengy/linux/test/cmake/lang/command/message/src1/CMakeLists.txt"
used to generate cache.  Re-run cmake with a different source
directory.


-- 
Regards,
Peng


More information about the CMake mailing list