# CMake isn't building my executable anymore. :(

**URL:** https://discourse.cmake.org/t/cmake-isnt-building-my-executable-anymore/6883
**Category:** Usage
**Created:** [November 16, 2022, 6:33pm UTC](https://discourse.cmake.org/t/cmake-isnt-building-my-executable-anymore/6883 "2022-11-16T18:33:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Jack](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jack/32/2926_2.png) [@Jack](https://discourse.cmake.org/u/Jack)
#### Post date: [November 16, 2022, 6:33pm UTC](https://discourse.cmake.org/t/cmake-isnt-building-my-executable-anymore/6883/1 "2022-11-16T18:33:33Z")

</div>

Every time I think I have CMake figured out, it then flummoxes me.

I edit the CMakeLists.txt file in my project file and then from the root folder, I type `cmake .` to rebuild the build environment (I’m using VS 17.4.0). This appears to work as my VS instance says that the project has been modified outside of the environment, and to reload it. Great.

I then try and build by executing from the root folder `cmake . -Bbuild`. I get the following:

```auto
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- Configuring done
-- Generating done
-- Build files have been written to: W:/my_project/build

```

However, the file wasn’t updated in the build folder. I even erased the files in the directory where the .exe resided, and it didn’t come back.

It was working before, and I have no idea what has changed. What could cause this behaviour?

---

<div class="post-metadata">

### Author: ![Jack](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jack/32/2926_2.png) [@Jack](https://discourse.cmake.org/u/Jack)
#### Post date: [November 16, 2022, 9:49pm UTC](https://discourse.cmake.org/t/cmake-isnt-building-my-executable-anymore/6883/2 "2022-11-16T21:49:37Z")

</div>

Oh, nm. I got the command mixed up. I should have been using the command

```auto
cmake --build .

```

🤦🏽‍♀️
