cmake: Use multithreaded compilation on VS 2008+

Multithreaded compilation has been supported since at least VS 2005 and
been robustly stable since at least VS 2008

Closes https://github.com/curl/curl/pull/7109
This commit is contained in:
Matias N. Goldberg 2021-05-20 15:11:57 -03:00 committed by Jay Satiro
parent 458a2d85f3
commit b4bed24459

View File

@ -1284,6 +1284,11 @@ if(MSVC)
else() else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
endif() endif()
# Use multithreaded compilation on VS 2008+
if(MSVC_VERSION GREATER_EQUAL 1500)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
endif()
endif() endif()
if(CURL_WERROR) if(CURL_WERROR)