As I know, qmake support /MP on command line builds after set ENV CL=/MP, and nmake can do parallel builds. Follow the MS docs: cl a.cpp b.cpp c.cpp /MP should works well on command line. Seems CMake does not implements this. So, can I request a feature for this?
2012/9/21 Bill Hoffman <bill.hoff...@kitware.com> > nmake does not do parallel builds. Try using jom. > > http://blog.qt.digia.com/2009/**03/27/speeding-up-visual-c-qt-**builds/<http://blog.qt.digia.com/2009/03/27/speeding-up-visual-c-qt-builds/> > http://qt-project.org/wiki/jom > > > /MP only works from the VS IDE. > > > > On 9/20/2012 11:34 AM, Andreas Haferburg wrote: > >> Hi Yuchen, >> >> we're using the same way to enable /MP, and it works for us. You didn't >> say exactly what doesn't work, so I'm left to guessing. >> >> Have you checked in Visual Studio if the flag is set (Project >> properties->C/C++->Command Line)? Maybe there's a conflicting option >> enabled? Or maybe you're changing the CMAKE_CXX_FLAGS variable too late, >> e.g. after calling add_executable()? >> >> Have you checked the value in Tools->Options->Projects and >> Solutions->VC++ Project Settings->Maximum ... >> >> Best regards, >> Andreas >> >> >> On 20.09.2012 10:45, Loaden wrote: >> >>> Hi, there! >>> I am using Windows SDK 7.1 + nmake + CMake for building Windows >>> applications. >>> Follow these: >>> http://www.cmake.org/**pipermail/cmake/2009-April/**028668.html<http://www.cmake.org/pipermail/cmake/2009-April/028668.html> >>> http://msdn.microsoft.com/en-**us/library/bb385193.aspx<http://msdn.microsoft.com/en-us/library/bb385193.aspx> >>> I can't make /MP option works after this change in CMake's main >>> CMakeLists.txt >>> >>> if (MSVC) >>> SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") >>> SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP") >>> message(STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}") >>> message(STATUS "CMAKE_C_FLAGS = ${CMAKE_C_FLAGS}") >>> endif() >>> >>> >>> I know Jom which is a good choice for speed up compilation, but some >>> times, it will broken my builds. >>> See: http://qt-project.org/wiki/jom >>> >>> Am I lost some option? does there exist an valid way? >>> or, It's just a bug from CMake self? >>> Thanks a lot! >>> >>> -- >>> Best Regards >>> Yuchen >>> >>> >>> >>> -- >>> >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/**opensource/opensource.html<http://www.kitware.com/opensource/opensource.html> >>> >>> Please keep messages on-topic and check the CMake FAQ at: >>> http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ> >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake> >>> >>> >> >> > > -- > Bill Hoffman > Kitware, Inc. > 28 Corporate Drive > Clifton Park, NY 12065 > bill.hoff...@kitware.com > http://www.kitware.com > 518 881-4905 (Direct) > 518 371-3971 x105 > Fax (518) 371-4573 > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/** > opensource/opensource.html<http://www.kitware.com/opensource/opensource.html> > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ> > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake> > -- Best Regards Yuchen
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake