I am invoking cmake as part of a jenkins script and am using "cmake --build
." to kick off the build.  This works but does not do the equivalent of
"make -j4" to take advantage of all 4 cores when run on a linux machine.
When run on a windows machine the building in parallel is already taken
care of by an add_definitions(/MP$(NUMBER_OF_PROCESSORS)) command in the
CMakeLists.txt.  Is there a command line option to get "cmake --build" to
invoke make with the appropriate -j option for linux builds ?  Or something
I can add to my CMakeLists.txt similar to the /MP option for Visual Studio
builds ?  Or will I have to invoke "make -j4" on linux and "cmake --build
." on windows instead of being able to keep the same build command
irrespective of OS ?


Powered by www.kitware.com

Visit other Kitware open-source projects at 

Please keep messages on-topic and check the CMake FAQ at: 

Follow this link to subscribe/unsubscribe:

Reply via email to