Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing arguments in CMake's build tool mode

Tags:

build

cmake

I have a set of small C programs to be compiled with Nmake. I launch the build process with

cmake -G "NMake Makefiles" ..

cmake --build buildDir

and Nmake begins to compile . The problem is that the build process stops at the first compile error. I want to build all programs that could be compiled. I know that there /K command line option for Nmake, but how could I pass this option if I have access only to CMakeLists.txt and cmake.exe? How can I pass arguments to the build tool in CMake's build tool mode?

like image 733
Denis Avatar asked Nov 19 '16 12:11

Denis


1 Answers

You can pass arguments to your build-tool after a --.
In your case it would be

cmake --build <buildDir> -- /K

Related documentation: https://cmake.org/cmake/help/v3.7/manual/cmake.1.html#build-tool-mode

like image 113
usr1234567 Avatar answered Sep 27 '22 20:09

usr1234567