[vtk-developers] target_link_libraries and spaces in path (cmake 2.8.8)

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Sep 17 17:44:54 EDT 2012


I'm running into curious issue with target_link_libraries() with CMake 2.8.8.

The issue manifests itself on ParaView Windows dashboards with MSMPI
(http://open.cdash.org/viewBuildError.php?buildid=2567995).
vtkParallelMPI libraries is missing link to msmpi.lib file. This is
despite the fact that VTK/Parallel/MPI/CMakeLists.txt has the
following line:

  target_link_libraries(vtkParallelMPI ${MPI_LIBRARIES})

and I verified that the MPI_LIBRARIES is indeed a full path to the
msmpi.lib file. The only special thing is that the path to msmpi.lib
file has spaces in it.
If I change the line to the following, things build just fine.

  target_link_libraries(vtkParallelMPI "${MPI_LIBRARIES}")

Is that indeed necessary, or am I missing something obvious here?

Utkarsh



More information about the vtk-developers mailing list