This is probably a dumb question. If its a duplicate I couldn't find it.
I am pretty new to CMake, I was first introduced to it via JetBrains IDE: CLion. I moved to VSCode, because I don't feel as comfortable, or as well equipped in any other environment, as I do in VSCode. Unfortunately building projects is generally easier in a true IDE, especially in VS2022. In VSCode I have to configure most stuff myself, but in truth, I learn way more doing that way, so I don't mind. So I usually set the version of C++ I am using via the project-root: CMakeLists.txt. Just now when I went to start a new project though I noticed something that popped up from Intellisense/Intellicode, there were two options I could choose:
CMAKE_CXX_STANDARD <ver>CXX_STANDARD <ver>
I have used, CMAKE_CXX_STANDARD 17, for about a year and a half, and never seen the version of the setting that isn't prepended with "CMAKE_". When I google it, I just find results for the CMAKE_CXX_STANDARD setting, which isn't surprising considering there syntax is nearly identical.
Further more, I tried them both, and I didn't notice a difference, but I don't really notice a difference when I don't add the configuration anyways. I was just wondering if what the difference is, if any, so I know which to use, and more importantly why to use it.
Below is an img that shows the C_CPP Microsoft IntelliSense extension's suggestions in V.S. Code.
NOTE:
The line: set(CXX_STANDARD)
is formatted wrong, it should have looked like this instead:
set(CXX_STANDARD 17)
