From: Matias N. Goldberg Date: Thu, 20 May 2021 18:11:57 +0000 (-0300) Subject: cmake: Use multithreaded compilation on VS 2008+ X-Git-Tag: curl-7_77_0~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4bed24459b69156faae9f2e323d78ffe8f5a245;p=thirdparty%2Fcurl.git 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 549a38a6d2..63944877a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1284,6 +1284,11 @@ if(MSVC) else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") endif() + + # Use multithreaded compilation on VS 2008+ + if(MSVC_VERSION GREATER_EQUAL 1500) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP") + endif() endif() if(CURL_WERROR)