3 ms·
FYI one of the lesser known features of cmake is that it can invoke your build tool as well: cmake .. cmake --build . This smartly invokes make/ninja/
by shadowmint 11y ago
FYI one of the lesser known features of cmake is that it can invoke your build tool as well:
cmake ..
cmake --build .
This smartly invokes make/ninja/msbuild or whatever directly from the command line; very useful on windows machines or to have 'universal' cmake runners for CI that touches multiple platforms.
(Also, tutorials; `cmake .. && cmake --build .` should smartly determine the correct compiler for the system and build it; you don't need the -G "FOO" stuff unless you're specifically doing something fancy)
- Polytonic 11y agoTIL! This is awesome! I never knew about this. What does it do under Windows? Does it run say, devenv.exe/msbuild in the shell, as opposed to in Visual Studio?
- shadowmint 11y agoYes, that's exactly what it does, if you're using the VS backend (which is the default). (So you can actually be in 100% console mode in windows if you want and never launch VS. :)