MSVC as compiler + debug / multi thread compile?

Answered

Hey

I have 2 questions if I may. My project has grown to the point where I cant use cLion any more to compile because it takes a lot of time to do so due to lack of multithreading. So my questions.

If using msvc as my compiler.

  1. Can I somehow multithread the compiling process? If I use mingw64 it runs in multithread but msvc does not, is there a flag or something?
  2.  Can I somehow debug msvc? I have quite few plugins/libs and as far as I can tell they only run with msvc, seeing as VS is fairly painful to use(after using cLion and getting accustomed to inteliJ systems) I now use clion to type code and vs to compile :- (

Any help would be great! 

0
4 comments

Hello!

1. Maybe you need to turn on some MSVC option? The /MP option, for example?

By the way, to specify compiler options you need to add to CMakeLists.txt smth similar to the following:

set(MSVC_COMPILE_FLAGS "/MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MSVC_COMPILE_FLAGS}" )

2. The MSVC debugger is not supported yet. Please follow the related feature request to get updates: https://youtrack.jetbrains.com/issue/CPP-8677. Feel free to comment or upvote.

0

Hey

Tried the flag, nothing changed. Still, only 1 cl.exe process compiling the app. Does cLion support multithreaded msvc ? I have no idea how it works tbh... but the same project with run in vs2017 via vs cmake compiles very fast comparing to minuted 5-10+ on clion. 

Glad there is ticket for debug will add my vote.

0

I've checked with the developer: NMake doesn't support parallel builds. JOM does support it, but we doesn't have support for JOM in CLion yet (https://youtrack.jetbrains.com/issue/CPP-9006).

0

Gotta add +1 and wait for proper support then... hope the debug & MP will come soon. I've been using cLion for a long while now(1.5+year), it would be great to be able to drop VS finally and not have to jump between 2 IDE's constantly... Thanks for the update! 

0

Please sign in to leave a comment.