mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
fixed parallel build under Windows
This commit is contained in:
parent
4aa47ad115
commit
209aaac95c
@ -198,11 +198,13 @@ if(MSVC)
|
||||
endforeach(flag_var)
|
||||
endif(BUILD_WITH_STATIC_CRT)
|
||||
|
||||
include(ProcessorCount)
|
||||
ProcessorCount(N)
|
||||
if(NOT N EQUAL 0)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP${N} ")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${N} ")
|
||||
if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8 AND NOT ${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} LESS 8.6)
|
||||
include(ProcessorCount)
|
||||
ProcessorCount(N)
|
||||
if(NOT N EQUAL 0)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP${N} ")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${N} ")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_WITH_DEBUG_INFO)
|
||||
|
Loading…
Reference in New Issue
Block a user