[cmake-developers] [CMake 0012874]: Bug in FindMPI.cmake under Windows
Mantis Bug Tracker
mantis at public.kitware.com
Sun Jan 15 14:43:41 EST 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=12874
======================================================================
Reported By: Mourad
Assigned To:
======================================================================
Project: CMake
Issue ID: 12874
Category: Modules
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-01-15 14:43 EST
Last Modified: 2012-01-15 14:43 EST
======================================================================
Summary: Bug in FindMPI.cmake under Windows
Description:
I get a link problem when linking to MPI libraries found by FindMPI.cmake. The
error I get is :
LINK : fatal error LNK1104: cannot open file 'C:\Program
Files\MPICH2\lib\mpi.lib C:\Program Files\MPICH2\lib\cxx.lib'
The problem is caused by line 416 of FindMPI.cmake, a "patch" is also given
below.
Line 416 :
- set(MPI_LIBRARIES_WORK "${MPI_LIBRARIES_WORK} ${MPI_LIB}")
+ set(MPI_LIBRARIES_WORK "${MPI_LIBRARIES_WORK};${MPI_LIB}")
Steps to Reproduce:
Just try to build this empty main.cpp with the provided CMakeLists.txt
CMakeLists.txt :
cmake_minimum_required(VERSION 2.8)
project(test_mpi)
find_package(MPI)
add_executable(test_mpi main.cpp)
target_link_libraries(test_mpi ${MPI_LIBRARIES})
main.cpp :
int main()
{
return 0;
}
Additional Information:
MPI installed from
http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-01-15 14:43 Mourad New Issue
======================================================================
More information about the cmake-developers
mailing list