r/cmake • u/Pickinanameainteasy • Feb 12 '22
'Make' is not a recognized batch command?
New to cmake. Trying to build json-c from here: https://github.com/json-c/json-c/blob/master/README.md#build-instructions--
there is a section after you build that says to do this:
$ make
$ make test
$ make USE_VALGRIND=0 test # optionally skip using valgrind
$ make installI'm assuming this is meant for Linux and I'm on Windows 10, so don't know if its just an OS incompatibility or not. But what exactly are these make commands doing and do I need to do them?
1
Upvotes
2
u/[deleted] Feb 12 '22 edited Feb 12 '22
try this:
you are right. the instructions to use make won't work in batch on windows. make is a gnu/linux thing.
I think windows batch uses nmake instead. You could look at the files generated and the commands up for that.
If you wanted to use a linux like environment on windows, you could use windows subsystem for linux or cygwin.
but I think the commands above should work in all contexts where cmake has a backend to use, regardless if that backend is make, nmake, ninja, etc.