diff options
author | Christian Pfeiffer <cpfeiffer@live.de> | 2018-01-31 16:43:30 (GMT) |
---|---|---|
committer | Christian Pfeiffer <cpfeiffer@live.de> | 2018-01-31 16:43:30 (GMT) |
commit | 0def36043f339210d117825a7149fc58c2907cae (patch) | |
tree | bd56ab1b06b041c4e9094eafcad768494fffa728 /Modules | |
parent | 9ecbec5e01951e288a405deaba39a41a133fda0a (diff) | |
download | CMake-0def36043f339210d117825a7149fc58c2907cae.zip CMake-0def36043f339210d117825a7149fc58c2907cae.tar.gz CMake-0def36043f339210d117825a7149fc58c2907cae.tar.bz2 |
FindMPI: Discard IMPI boilerplate text
Intel MPI on Windows prefixes all outputs with some boilerplate
copyright text. By discarding it, we should prevent any potential
clashes with our regex parsing.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindMPI.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 78e1040..4bfbf03 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -521,6 +521,10 @@ function (_MPI_interrogate_compiler LANG) # We'll normalize this to the - syntax we use for CMake purposes anyways. if(MSVC) foreach(_MPI_VARIABLE IN ITEMS COMPILE LINK) + # The Intel MPI wrappers on Windows prefix their output with some copyright boilerplate. + # To prevent possible problems, we discard this text before proceeding with any further matching. + string(REGEX REPLACE "^[^ ]+ for the Intel\\(R\\) MPI Library [^\n]+ for Windows\\*\nCopyright\\(C\\) [^\n]+, Intel Corporation\\. All rights reserved\\.\n\n" "" + MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") string(REGEX REPLACE "(^| )/" "\\1-" MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") string(REPLACE "-libpath:" "-LIBPATH:" MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") endforeach() |