[vcpkg_build_nmake] Fix /MP -> /FS transformation (#41815)

This commit is contained in:
Kai Pastor 2024-11-14 12:16:06 +01:00 committed by GitHub
parent a469702fe1
commit 9b5cb8e554
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,7 @@ function(vcpkg_build_nmake)
endif()
if(NOT DEFINED arg_CL_LANGUAGE)
vcpkg_list(SET arg_CL_LANGUAGE CXX)
set(arg_CL_LANGUAGE CXX)
endif()
find_program(NMAKE nmake REQUIRED)
@ -57,8 +57,8 @@ function(vcpkg_build_nmake)
get_filename_component(JOM_EXE_PATH "${JOM}" DIRECTORY)
vcpkg_add_to_path("${JOM_EXE_PATH}")
if(arg_CL_LANGUAGE AND "${VCPKG_DETECTED_CMAKE_${arg_CL_LANGUAGE}_COMPILER_ID}" STREQUAL "MSVC")
string(REGEX REPLACE " [/-]MP[0-9]* " " " VCPKG_COMBINED_${arg_CL_LANGUAGE}_FLAGS_DEBUG " ${VCPKG_COMBINED_${arg_CL_LANGUAGE}_FLAGS_DEBUG} /FS")
string(REGEX REPLACE " [/-]MP[0-9]* " " " VCPKG_COMBINED_${arg_CL_LANGUAGE}_FLAGS_RELEASE " ${VCPKG_COMBINED_${arg_CL_LANGUAGE}_FLAGS_RELEASE} /FS")
string(REGEX REPLACE " [/-]MP[0-9]* " " " VCPKG_DETECTED_CMAKE_${arg_CL_LANGUAGE}_FLAGS_DEBUG " ${VCPKG_DETECTED_CMAKE_${arg_CL_LANGUAGE}_FLAGS_DEBUG} /FS")
string(REGEX REPLACE " [/-]MP[0-9]* " " " VCPKG_DETECTED_CMAKE_${arg_CL_LANGUAGE}_FLAGS_RELEASE " ${VCPKG_DETECTED_CMAKE_${arg_CL_LANGUAGE}_FLAGS_RELEASE} /FS")
endif()
else()
set(arg_PREFER_JOM FALSE)