MantisBT - CMake
View Issue Details
0015425CMake(No Category)public2015-02-27 10:532015-11-02 09:13
Mathieu Malaterre 
 
normalminorhave not tried
closedno change required 
CMake 3.1.3 
 
0015425: Missing OpenMP installation in InstallRequiredSystemLibraries
It would be nice if InstallRequiredSystemLibraries would be smart to figure out that code was compiled with openmp support and thus add something like:

if (OPENMP_FOUND)
  install(FILES "C:/Program Files/Microsoft Visual Studio 10.0/VC/redist/x86/Microsoft.VC100.OPENMP/vcomp100.dll" DESTINATION bin COMPONENT Libraries)
endif(OPENMP_FOUND)


ref:
https://braintrekking.wordpress.com/2013/04/27/dll-hell-how-to-include-microsoft-redistributable-runtime-libraries-in-your-cmakecpack-project/ [^]
-> scroll to "Case 2: You are using openmp"
No tags attached.
Issue History
2015-02-27 10:53Mathieu MalaterreNew Issue
2015-02-27 11:23Mathieu MalaterreNote Added: 0038098
2015-03-03 08:57Brad KingNote Added: 0038140
2015-03-03 08:57Brad KingStatusnew => resolved
2015-03-03 08:57Brad KingResolutionopen => no change required
2015-03-03 09:14Mathieu MalaterreNote Added: 0038141
2015-11-02 09:13Robert MaynardNote Added: 0039721
2015-11-02 09:13Robert MaynardStatusresolved => closed

Notes
(0038098)
Mathieu Malaterre   
2015-02-27 11:23   
Tested only on VS10, but I'd love to hear from other people:

if (OPENMP_FOUND)
  if(MSVC10)
    install(FILES "${MSVC10_REDIST_DIR}/x86/Microsoft.VC100.OPENMP/vcomp100.dll" DESTINATION bin)
  endif()
  if(MSVC11)
    install(FILES "${MSVC11_REDIST_DIR}/x86/Microsoft.VC110.OPENMP/vcomp110.dll" DESTINATION bin)
  endif()
  if(MSVC12)
    install(FILES "${MSVC12_REDIST_DIR}/x86/Microsoft.VC120.OPENMP/vcomp120.dll" DESTINATION bin)
  endif()
endif(OPENMP_FOUND)
(0038140)
Brad King   
2015-03-03 08:57   
There is already a CMAKE_INSTALL_OPENMP_LIBRARIES option for this:

 http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/InstallRequiredSystemLibraries.cmake;hb=v3.1.3#l382 [^]
(0038141)
Mathieu Malaterre   
2015-03-03 09:14   
sorry for the noise, I was using cmake 3.0.2 (default debian jessie version). Thanks for the help !
(0039721)
Robert Maynard   
2015-11-02 09:13   
Closing resolved issues that have not been updated in more than 4 months.