Another great video! One question though. I built the CMake project for different IDEs and compilers and I did notice that some other IDEs are not exactly great at picking up with the syntax completion and highlighting aspect like Visual Studio, CodeLite, etc. Is there any way to make them work?
For Visual Studio Code, you need an extension and even that doesn't highlight perfectly. I suspect other IDEs just haven't prioritized highlighting CMake logic. You could look for extensions to add that ability for them also.
That will also work but if you check CMake's documentation you can see that it has been "superseded" by add_compile_definitions. (It still exists for backwards compatibility reasons.) Add_definitions basically just drops your string into the command line and technically can be used to also include directories and do other things, whereas add_compile_definitions is designed to be specific.
Thanks a lot for this CMake series!!
Another great video! One question though. I built the CMake project for different IDEs and compilers and I did notice that some other IDEs are not exactly great at picking up with the syntax completion and highlighting aspect like Visual Studio, CodeLite, etc. Is there any way to make them work?
For Visual Studio Code, you need an extension and even that doesn't highlight perfectly. I suspect other IDEs just haven't prioritized highlighting CMake logic. You could look for extensions to add that ability for them also.
cLion is best.
How do you add Defines to different config types and/or based on cmake config variables?
So you mean like a config.h file?
What Abt add definition
That will also work but if you check CMake's documentation you can see that it has been "superseded" by add_compile_definitions. (It still exists for backwards compatibility reasons.)
Add_definitions basically just drops your string into the command line and technically can be used to also include directories and do other things, whereas add_compile_definitions is designed to be specific.
@@sudocpp I was asking what does it do but thanks