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:
-- 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?