diff options
author | Brad King <brad.king@kitware.com> | 2014-09-04 13:48:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-09-04 13:48:17 (GMT) |
commit | 9651cb70ae65d42823c286c8721947fb1f3b6d26 (patch) | |
tree | 7c49cf0e16a66382e636d8a4756cf50601d54c27 | |
parent | 88400e5c5b7dfbcf11bac19a81bd4bafe900cc6c (diff) | |
parent | d538c55ea4143872c01d39b419b168f2a2a820f1 (diff) | |
download | CMake-9651cb70ae65d42823c286c8721947fb1f3b6d26.zip CMake-9651cb70ae65d42823c286c8721947fb1f3b6d26.tar.gz CMake-9651cb70ae65d42823c286c8721947fb1f3b6d26.tar.bz2 |
Merge topic 'InstallRequiredSystemLibraries-vs-openmp'
d538c55e Help: Add notes for topic 'InstallRequiredSystemLibraries-vs-openmp'
bdb5007b InstallRequiredSystemLibraries: Install OpenMP runtime libs (#15117)
-rw-r--r-- | Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst | 6 | ||||
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 36 |
2 files changed, 42 insertions, 0 deletions
diff --git a/Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst b/Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst new file mode 100644 index 0000000..4f8f962 --- /dev/null +++ b/Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst @@ -0,0 +1,6 @@ +InstallRequiredSystemLibraries-vs-openmp +---------------------------------------- + +* The :module:`InstallRequiredSystemLibraries` module gained a new + ``CMAKE_INSTALL_OPENMP_LIBRARIES`` option to install MSVC OpenMP + runtime libraries. diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 349cbf5..5afb517 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -19,6 +19,8 @@ # libraries are installed when both debug and release are available. If # CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time libraries are # installed as well as the CRT run time libraries. If +# CMAKE_INSTALL_OPENMP_LIBRARIES is set then the OpenMP run time libraries +# are installed as well. If # CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION is set then the libraries are # installed to that directory rather than the default. If # CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is NOT set, then this @@ -377,6 +379,40 @@ if(MSVC) endif() endif() + # MSVC 8 was the first version with OpenMP + # Furthermore, there is no debug version of this + if(CMAKE_INSTALL_OPENMP_LIBRARIES) + macro(OPENMP_FILES_FOR_VERSION version_a version_b) + set(va "${version_a}") + set(vb "${version_b}") + set(MSVC${va}_OPENMP_DIR "${MSVC${va}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vb}.OPENMP") + + if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) + set(__install__libs ${__install__libs} + "${MSVC${va}_OPENMP_DIR}/vcomp${vb}.dll") + endif() + endmacro() + + if(MSVC80) + OPENMP_FILES_FOR_VERSION(80 80) + endif() + if(MSVC90) + OPENMP_FILES_FOR_VERSION(90 90) + endif() + if(MSVC10) + OPENMP_FILES_FOR_VERSION(10 100) + endif() + if(MSVC11) + OPENMP_FILES_FOR_VERSION(11 110) + endif() + if(MSVC12) + OPENMP_FILES_FOR_VERSION(12 120) + endif() + if(MSVC14) + OPENMP_FILES_FOR_VERSION(14 140) + endif() + endif() + foreach(lib ${__install__libs} ) |