# Use CMake without compiling in VS2022?

**URL:** https://discourse.cmake.org/t/use-cmake-without-compiling-in-vs2022/13278
**Category:** Usage
**Created:** [December 28, 2024, 9:30pm UTC](https://discourse.cmake.org/t/use-cmake-without-compiling-in-vs2022/13278 "2024-12-28T21:30:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Markus\_Wagner](https://discourse.cmake.org/user_avatar/discourse.cmake.org/markus_wagner/32/5234_2.png) [@Markus\_Wagner](https://discourse.cmake.org/u/Markus_Wagner)
#### Post date: [December 28, 2024, 9:30pm UTC](https://discourse.cmake.org/t/use-cmake-without-compiling-in-vs2022/13278/1 "2024-12-28T21:30:37Z")

</div>

Hello!  
I am a absolute CMake Newbie. So please excuse a maybe dumb question.  
Is it possible to use CMake only for collecting files, zip them and install them in a predefined folder?  
Why?: I have a VS2022 Project for creating Class Templates, which then goes to the VS2022 Template Folder. I have this Project because i have other projects and there i include my Class Template Project. This makes it simple to edit my Class Template Files within VS2022.  
But the i have to go out of VS2022, zip the files (.cpp .h .vstemplate) and manually copy them into the VS2022 Folder. I want to automate this process. So i tought it would be a good idea to make a CMake file in my Class Template Project to automate this project.  
I dont need to compile this files because i need raw .h and .cpp files.

I see that i can get rid of addExecutabe and set\_property calls in the CMakeList.txt

But the how i can execute the “Build” in VS2022 because if i dont use the addExecutable then there is no Project “Build” Possibility anymore.

Thx a lot

---

<div class="post-metadata">

### Author: ![Markus\_Wagner](https://discourse.cmake.org/user_avatar/discourse.cmake.org/markus_wagner/32/5234_2.png) [@Markus\_Wagner](https://discourse.cmake.org/u/Markus_Wagner)
#### Post date: [December 28, 2024, 10:01pm UTC](https://discourse.cmake.org/t/use-cmake-without-compiling-in-vs2022/13278/2 "2024-12-28T22:01:43Z")

</div>

I think i maybe ending up with a small C++ app in the project which zip and copy the files. Seems easier 😉
