llvm.org GIT mirror llvm / 0dddbc3
Support for parallel compilation (/MP) when using the VS IDE. Patch by Erik Olofsson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126847 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 8 years ago
2 changed file(s) with 41 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
101101 endif( LLVM_BUILD_32_BITS )
102102 endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
103103
104 message(STATUS "uno"
105 "dos")
106 if( MSVC_IDE AND ( MSVC90 OR MSVC10 ) )
107 # Only Visual Studio 2008 and 2010 officially supports /MP.
108 # Visual Studio 2005 do support it but it's experimental there.
109 set(LLVM_COMPILER_JOBS "0" CACHE STRING
110 "Number of parallel compiler jobs. 0 means use all processors. Default is 0.")
111 if( NOT LLVM_COMPILER_JOBS STREQUAL "1" )
112 if( LLVM_COMPILER_JOBS STREQUAL "0" )
113 add_llvm_definitions( /MP )
114 else()
115 if (MSVC10)
116 message(FATAL_ERROR
117 "Due to a bug in CMake only 0 and 1 is supported for "
118 "LLVM_COMPILER_JOBS when generating for Visual Studio 2010")
119 else()
120 message(STATUS "Number of parallel compiler jobs set to " ${LLVM_COMPILER_JOBS})
121 add_llvm_definitions( /MP${LLVM_COMPILER_JOBS} )
122 endif()
123 endif()
124 else()
125 message(STATUS "Parallel compilation disabled")
126 endif()
127 endif()
128
104129 if( MSVC )
105130 include(ChooseMSVCCRT)
106131
451451
452452
453453
454
455 Microsoft Visual C++
456
457
458
459
460
461
LLVM_COMPILER_JOBS:STRING
462
Specifies the maximum number of parallell compiler jobs to use
463 per project when building with msbuild or Visual Studio. Only supported for
464 Visual Studio 2008 and Visual Studio 2010 CMake generators. 0 means use all
465 processors. Default is 0.
466
467
468
469
454470
455471
456472