Ask Your Question
0

Building opencv in parallel with mingw (using cmake-gui)

asked 2017-08-28 05:11:44 -0600

nji gravatar image

Is this possible with tdm-gcc 4.9? And where do I have to set which option in CMake-GUI (-jN)?

edit retag flag offensive close merge delete

Comments

the -j4 option should go into your make line, not into the cmake one(cmake-gui itself needs only 1 thread)

berak gravatar imageberak ( 2017-08-28 05:19:26 -0600 )edit

Yes, I know that. My question is HOW and where to insert the -jN-Option. As cmake builds the make files, this should be the place to insert the option. But I didn't find where. (Sorry, I didn't saw your comment earlier, as I only looked for the answered-flag).

nji gravatar imagenji ( 2017-08-29 07:23:11 -0600 )edit

this option is usually not part of the makefile, but you invoke make like

make -j4
berak gravatar imageberak ( 2017-08-29 07:28:26 -0600 )edit

Thankyou again. Still we're misunderstanding ... I try to explain: cmake generates the makefiles (and in my case the codeblock project file that executes the makefile). The makefile is 92 kB, the c:b project file is about 800 kB. I cannot image that it is necessary to change the makefile itself. (cmake generated file: DO NOT EDIT! Generated by "MinGW Makefiles" Generator, CMake Version 3.8). I can only imagine that there is a simple option in cmake. I searched, tried, ... but was not successful. What exactly do I have to do to let build opencv mulithreaded? (Actually for me it seems only natural to do so, as single-threaded it takes very long to build it anew. So one should think everybody should do this ...???)

nji gravatar imagenji ( 2017-08-29 07:41:51 -0600 )edit

ah, i don't see any point in using code-blocks to build the opencv libs. especially, if you're using plain unix makefiles.

just run make -j4 from the cmdline in your build folder.

berak gravatar imageberak ( 2017-08-29 08:01:54 -0600 )edit

(... while my 8 horses have been busy ... ;-)) ... ). The point is I'm still a newby to open source toolchains (coming from convenient M$), and having decided for c:b, and then needed opencv, and for that cmake, cmake found the c:b toolchain and suggested to build project-files for that.

nji gravatar imagenji ( 2017-08-29 08:42:16 -0600 )edit

^^ yea, good luck !

berak gravatar imageberak ( 2017-08-29 08:59:45 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-08-29 07:58:55 -0600

nji gravatar image

updated 2017-08-29 08:18:47 -0600

Found it ... (at last!) in cmake: CMAKE_CODEBLOCKS_MAKE_ARGUMENTS

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-08-28 05:11:44 -0600

Seen: 678 times

Last updated: Aug 29 '17