Skip to content

Commit

Permalink
[msmpi] support dynamic CRT
Browse files Browse the repository at this point in the history
  • Loading branch information
albertziegenhagel committed Aug 30, 2020
1 parent 01f6290 commit 3bf854e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ports/msmpi/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ vcpkg_from_github(
disable-x86-safeseh.patch
)

if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
set(PROPERTY_FILE_PATHS "${SOURCE_PATH}/Directory.Build.props" "${SOURCE_PATH}/src/mpi.props" )
foreach(PROPERTY_FILE_PATH IN LISTS PROPERTY_FILE_PATHS)
file(READ ${PROPERTY_FILE_PATH} _contents)
string(REPLACE "<ConfigurationType>MultiThreaded</ConfigurationType>" "<ConfigurationType>MultiThreadedDLL</ConfigurationType>" _contents "${_contents}")
string(REPLACE "<ConfigurationType>MultiThreadedDebug</ConfigurationType>" "<ConfigurationType>MultiThreadedDebugDLL</ConfigurationType>" _contents "${_contents}")
file(WRITE ${PROPERTY_FILE_PATH} "${_contents}")
endforeach()
endif()

# Acquire gfortran
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(MINGW_PATH mingw32)
Expand Down

0 comments on commit 3bf854e

Please sign in to comment.