How to duplicate a CMake project on Windows 10
-
I can't imagine that there is no easy solution for duplicating a CMake project.
Apparently, copying the files to a different folder didn't work. QT stubbornly pointed to the old project even after I removed the whole build folder. Neither could I simply rename the project in QT. What's going on? I can't imagine you all create a new project and copy paste hundreds of files into it. There must be an easy way to on-click do this. I Googled more and figured it has something to do with CMake cache, but since I already removed the whole build folder I can't see what else I need to remove.
Here are some of the error messages I received:
Then I clicked "Clean" in "Build" menu ->
:-1: error: The build configuration is currently disabled.
WTF does that even mean? Who disabled it? What is disabled? Googling doesn't bring any sensible answers.Tried to Rebuild ->
:-1: warning: There is a CMakeCache.txt file in "C:\Dev\qt\QLauncher", which suggest an in-source build was done before. You are now building in "C:\Dev\qt\QuakeLauncher\build\Desktop_Qt_6_7_3_MinGW_64_bit-Debug", and the CMakeCache.txt file might confuse CMake.
Yeah I know that, why are you still pointing to the original folder? I removed the whole build folder and replaced all strings of QuakeLauncher to QLauncher. Where TF did you get that QuakeLauncher string? It is completely gone from the new project!Thanks in advance. Sorry for the vent but yeah I was really frustrated by this.
-
Hi,
If I really need to duplicate something, the command line is faster (
cp -a source target
) or even copy paste in your system explorer application.
What likely happens is that you have aCMakeLists.txt.user
that you should delete from your copy.