[cmake-developers] [CMake 0015942]: regexpr in FindMPI.cmake filtering MPI_COMPILE_FLAGS fails for Intel-flag "-fp-model"

Mantis Bug Tracker mantis at public.kitware.com
Fri Jan 29 10:34:42 EST 2016


The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=15942 
====================================================================== 
Reported By:                Jens Henrik Goebbert
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15942
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2016-01-29 10:34 EST
Last Modified:              2016-01-29 10:34 EST
====================================================================== 
Summary:                    regexpr in FindMPI.cmake filtering MPI_COMPILE_FLAGS
fails for Intel-flag "-fp-model"
Description: 

FindMPI.cmake fails to filter the keyword required for Intel´s compile flags
"-fp-model".

example:
icpc -O2 -xHost -ftz -fp-speculation=safe -fp-model source
-Wl,-rpath-link=/usr/local/software/jureca/Stage1/software/Core/pscom/5.0.45-1/lib

returns    -ftz -fp-speculation=safe -fp-model
instead of -ftz -fp-speculation=safe -fp-model source

reason:
any word not starting with -D or -f is skipped by regexpression in line 294
string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS
"${MPI_COMPILE_CMDLINE}")


Steps to Reproduce: 
configure mpi, that mpicxx -showme:compile (for openmpi and openmpi derivatives)
or mpi -compile-info (for mpich and mpich derivatives) includes the flag
"-fp-model source"

include find_package(MPI) and check MPI_CXX_COMPILE_FLAGS
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-01-29 10:34 Jens Henrik GoebbertNew Issue                                  
 
======================================================================



More information about the cmake-developers mailing list