[Cmake-commits] CMake branch, next, updated. v3.8.0-rc2-603-gab31b34

Kitware Robot kwrobot at kitware.com
Thu Mar 23 10:55:04 EDT 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  ab31b34c7f87f2703299f0e5af1fb3cec9fa39b5 (commit)
       via  835c6bc8f1bfdc0258a56bfb45b629119ff49bea (commit)
       via  d4a693a08385024175240a5543cc2a7bb7311966 (commit)
       via  5ed4e48128837df0539cb1570c954e2872256930 (commit)
       via  dbdb880af976b82f6530de5753b84cfa53c985c8 (commit)
       via  d40fc8856d3cc3cd40e091d858df4fb1725f1406 (commit)
      from  b95ba9c47daae0f77c06a2e993e342cb74de5ce3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab31b34c7f87f2703299f0e5af1fb3cec9fa39b5
commit ab31b34c7f87f2703299f0e5af1fb3cec9fa39b5
Merge: 835c6bc d40fc88
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Mar 23 14:52:14 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Mar 23 10:52:17 2017 -0400

    Stage topic 'make_sure_cuda_tests_run'
    
    Topic-id: 23212
    Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/615


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=835c6bc8f1bfdc0258a56bfb45b629119ff49bea
commit 835c6bc8f1bfdc0258a56bfb45b629119ff49bea
Merge: b95ba9c d4a693a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Mar 23 14:48:05 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Mar 23 10:48:08 2017 -0400

    Stage topic 'InstallRequiredSystemLibraries-vs2017'
    
    Topic-id: 23213
    Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/616


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4a693a08385024175240a5543cc2a7bb7311966
commit d4a693a08385024175240a5543cc2a7bb7311966
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Mar 23 10:30:14 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Mar 23 10:30:14 2017 -0400

    InstallRequiredSystemLibraries: Add support for VS 2017
    
    VS 2017 (VS 15) places its redist DLLs in `Microsoft.VC150.*`
    directories but still uses version number `140` in the DLL names.  The
    redist directories now have version numbers in their name, and the MSVC
    and MFC runtime DLLs may be in directories with different versions.
    Fill out our logic to handle this.
    
    For now assume we are given the `MSVC_REDIST_DIR` value as a cache
    entry.  Unfortunately we cannot yet find the VS 2017 MSVC redist
    directory automatically since there is no registry entry for the VS
    installation.  Later we will have to use `cmVSSetupHelper` for this.
    
    Issue: #16735

diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 2ff2f06..1061da0 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -166,7 +166,10 @@ if(MSVC)
     endif()
   endif()
 
-  if(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910)
+  if(MSVC_VERSION EQUAL 1910)
+    set(_MSVCRT_DLL_VERSION 140)
+    set(_MSVCRT_IDE_VERSION 15)
+  elseif(MSVC_VERSION EQUAL 1900)
     set(_MSVCRT_DLL_VERSION 140)
     set(_MSVCRT_IDE_VERSION 14)
   elseif(MSVC_VERSION EQUAL 1800)
@@ -191,7 +194,7 @@ if(MSVC)
     get_filename_component(msvc_install_dir
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE)
     set(programfilesx86 "ProgramFiles(x86)")
-    if(DEFINED MSVC${vs}_REDIST_DIR AND EXISTS "${MSVC${vs}_REDIST_DIR}")
+    if(vs VERSION_LESS 15 AND DEFINED MSVC${vs}_REDIST_DIR AND EXISTS "${MSVC${vs}_REDIST_DIR}")
       set(MSVC_REDIST_DIR "${MSVC${vs}_REDIST_DIR}") # use old cache entry
     endif()
     find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.CRT
@@ -362,7 +365,10 @@ if(MSVC)
         )
     endif()
 
-    if(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910)
+    if(MSVC_VERSION EQUAL 1910)
+      set(_MFC_DLL_VERSION 140)
+      set(_MFC_IDE_VERSION 15)
+    elseif(MSVC_VERSION EQUAL 1900)
       set(_MFC_DLL_VERSION 140)
       set(_MFC_IDE_VERSION 14)
     elseif(MSVC_VERSION EQUAL 1800)
@@ -383,7 +389,16 @@ if(MSVC)
       set(v "${_MFC_DLL_VERSION}")
       set(vs "${_MFC_IDE_VERSION}")
 
-      set(MSVC_REDIST_MFC_DIR "${MSVC_REDIST_DIR}")
+      # Starting with VS 15 the MFC DLLs may be in a different directory.
+      if (NOT vs VERSION_LESS 15)
+        file(GLOB _MSVC_REDIST_DIRS "${MSVC_REDIST_DIR}/../*")
+        find_path(MSVC_REDIST_MFC_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFC
+          PATHS ${_MSVC_REDIST_DIRS} NO_DEFAULT_PATH)
+        mark_as_advanced(MSVC_REDIST_MFC_DIR)
+        unset(_MSVC_REDIST_DIRS)
+      else()
+        set(MSVC_REDIST_MFC_DIR "${MSVC_REDIST_DIR}")
+      endif()
 
       # Multi-Byte Character Set versions of MFC are available as optional
       # addon since Visual Studio 12.  So for version 12 or higher, check
@@ -438,7 +453,10 @@ if(MSVC)
   # MSVC 8 was the first version with OpenMP
   # Furthermore, there is no debug version of this
   if(CMAKE_INSTALL_OPENMP_LIBRARIES)
-    if(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910)
+    if(MSVC_VERSION EQUAL 1910)
+      set(_MSOMP_DLL_VERSION 140)
+      set(_MSOMP_IDE_VERSION 15)
+    elseif(MSVC_VERSION EQUAL 1900)
       set(_MSOMP_DLL_VERSION 140)
       set(_MSOMP_IDE_VERSION 14)
     elseif(MSVC_VERSION EQUAL 1800)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ed4e48128837df0539cb1570c954e2872256930
commit 5ed4e48128837df0539cb1570c954e2872256930
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Mar 23 10:26:52 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Mar 23 10:26:52 2017 -0400

    InstallRequiredSystemLibraries: Split MFC redist dir variable

diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index d19d030..2ff2f06 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -383,13 +383,15 @@ if(MSVC)
       set(v "${_MFC_DLL_VERSION}")
       set(vs "${_MFC_IDE_VERSION}")
 
+      set(MSVC_REDIST_MFC_DIR "${MSVC_REDIST_DIR}")
+
       # Multi-Byte Character Set versions of MFC are available as optional
       # addon since Visual Studio 12.  So for version 12 or higher, check
       # whether they are available and exclude them if they are not.
 
       if(CMAKE_INSTALL_DEBUG_LIBRARIES)
         set(MSVC_MFC_DIR
-          "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.DebugMFC")
+          "${MSVC_REDIST_MFC_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.DebugMFC")
         set(__install__libs ${__install__libs}
           "${MSVC_MFC_DIR}/mfc${v}ud.dll"
           "${MSVC_MFC_DIR}/mfcm${v}ud.dll"
@@ -402,7 +404,7 @@ if(MSVC)
         endif()
       endif()
 
-      set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFC")
+      set(MSVC_MFC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFC")
       if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
         set(__install__libs ${__install__libs}
           "${MSVC_MFC_DIR}/mfc${v}u.dll"
@@ -417,7 +419,7 @@ if(MSVC)
       endif()
 
       # include the language dll's as well as the actuall dll's
-      set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFCLOC")
+      set(MSVC_MFCLOC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFCLOC")
       set(__install__libs ${__install__libs}
         "${MSVC_MFCLOC_DIR}/mfc${v}chs.dll"
         "${MSVC_MFCLOC_DIR}/mfc${v}cht.dll"

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbdb880af976b82f6530de5753b84cfa53c985c8
commit dbdb880af976b82f6530de5753b84cfa53c985c8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Mar 23 10:14:50 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Mar 23 10:14:50 2017 -0400

    InstallRequiredSystemLibraries: Split VS IDE and DLL versions
    
    Refactor MSVC logic to split the IDE and DLL version variables.

diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 67dfe8f..d19d030 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -167,48 +167,54 @@ if(MSVC)
   endif()
 
   if(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910)
-    set(_MSVCRT_VERSION 14)
+    set(_MSVCRT_DLL_VERSION 140)
+    set(_MSVCRT_IDE_VERSION 14)
   elseif(MSVC_VERSION EQUAL 1800)
-    set(_MSVCRT_VERSION 12)
+    set(_MSVCRT_DLL_VERSION 120)
+    set(_MSVCRT_IDE_VERSION 12)
   elseif(MSVC_VERSION EQUAL 1700)
-    set(_MSVCRT_VERSION 11)
+    set(_MSVCRT_DLL_VERSION 110)
+    set(_MSVCRT_IDE_VERSION 11)
   elseif(MSVC_VERSION EQUAL 1600)
-    set(_MSVCRT_VERSION 10)
+    set(_MSVCRT_DLL_VERSION 100)
+    set(_MSVCRT_IDE_VERSION 10)
   else()
-    set(_MSVCRT_VERSION "")
+    set(_MSVCRT_DLL_VERSION "")
+    set(_MSVCRT_IDE_VERSION "")
   endif()
 
-  if(_MSVCRT_VERSION)
-    set(v "${_MSVCRT_VERSION}")
+  if(_MSVCRT_DLL_VERSION)
+    set(v "${_MSVCRT_DLL_VERSION}")
+    set(vs "${_MSVCRT_IDE_VERSION}")
 
     # Find the runtime library redistribution directory.
     get_filename_component(msvc_install_dir
-      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${v}.0;InstallDir]" ABSOLUTE)
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE)
     set(programfilesx86 "ProgramFiles(x86)")
-    if(DEFINED MSVC${v}_REDIST_DIR AND EXISTS "${MSVC${v}_REDIST_DIR}")
-      set(MSVC_REDIST_DIR "${MSVC${v}_REDIST_DIR}") # use old cache entry
+    if(DEFINED MSVC${vs}_REDIST_DIR AND EXISTS "${MSVC${vs}_REDIST_DIR}")
+      set(MSVC_REDIST_DIR "${MSVC${vs}_REDIST_DIR}") # use old cache entry
     endif()
-    find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT
+    find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.CRT
       PATHS
         "${msvc_install_dir}/../../VC/redist"
         "${base_dir}/VC/redist"
-        "$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist"
-        "$ENV{${programfilesx86}}/Microsoft Visual Studio ${v}.0/VC/redist"
+        "$ENV{ProgramFiles}/Microsoft Visual Studio ${vs}.0/VC/redist"
+        "$ENV{${programfilesx86}}/Microsoft Visual Studio ${vs}.0/VC/redist"
       )
     mark_as_advanced(MSVC_REDIST_DIR)
-    set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT")
+    set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.CRT")
 
     if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
       set(__install__libs
-        "${MSVC_CRT_DIR}/msvcp${v}0.dll"
+        "${MSVC_CRT_DIR}/msvcp${v}.dll"
         )
-      if(NOT v VERSION_LESS 14)
+      if(NOT vs VERSION_LESS 14)
         list(APPEND __install__libs
-            "${MSVC_CRT_DIR}/vcruntime${v}0.dll"
-            "${MSVC_CRT_DIR}/concrt${v}0.dll"
+            "${MSVC_CRT_DIR}/vcruntime${v}.dll"
+            "${MSVC_CRT_DIR}/concrt${v}.dll"
             )
       else()
-        list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}0.dll")
+        list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}.dll")
       endif()
     else()
       set(__install__libs)
@@ -216,21 +222,21 @@ if(MSVC)
 
     if(CMAKE_INSTALL_DEBUG_LIBRARIES)
       set(MSVC_CRT_DIR
-        "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugCRT")
+        "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.DebugCRT")
       set(__install__libs ${__install__libs}
-        "${MSVC_CRT_DIR}/msvcp${v}0d.dll"
+        "${MSVC_CRT_DIR}/msvcp${v}d.dll"
         )
-      if(NOT v VERSION_LESS 14)
+      if(NOT vs VERSION_LESS 14)
         list(APPEND __install__libs
-            "${MSVC_CRT_DIR}/vcruntime${v}0d.dll"
-            "${MSVC_CRT_DIR}/concrt${v}0d.dll"
+            "${MSVC_CRT_DIR}/vcruntime${v}d.dll"
+            "${MSVC_CRT_DIR}/concrt${v}d.dll"
             )
       else()
-        list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}0d.dll")
+        list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}d.dll")
       endif()
     endif()
 
-    if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT v VERSION_LESS 14)
+    if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT vs VERSION_LESS 14)
       # Find the Windows Kits directory.
       get_filename_component(windows_kits_dir
         "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE)
@@ -357,19 +363,25 @@ if(MSVC)
     endif()
 
     if(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910)
-      set(_MFC_VERSION 14)
+      set(_MFC_DLL_VERSION 140)
+      set(_MFC_IDE_VERSION 14)
     elseif(MSVC_VERSION EQUAL 1800)
-      set(_MFC_VERSION 12)
+      set(_MFC_DLL_VERSION 120)
+      set(_MFC_IDE_VERSION 12)
     elseif(MSVC_VERSION EQUAL 1700)
-      set(_MFC_VERSION 11)
+      set(_MFC_DLL_VERSION 110)
+      set(_MFC_IDE_VERSION 11)
     elseif(MSVC_VERSION EQUAL 1600)
-      set(_MFC_VERSION 10)
+      set(_MFC_DLL_VERSION 100)
+      set(_MFC_IDE_VERSION 10)
     else()
-      set(_MFC_VERSION "")
+      set(_MFC_DLL_VERSION "")
+      set(_MFC_IDE_VERSION "")
     endif()
 
-    if(_MFC_VERSION)
-      set(v "${_MFC_VERSION}")
+    if(_MFC_DLL_VERSION)
+      set(v "${_MFC_DLL_VERSION}")
+      set(vs "${_MFC_IDE_VERSION}")
 
       # Multi-Byte Character Set versions of MFC are available as optional
       # addon since Visual Studio 12.  So for version 12 or higher, check
@@ -377,46 +389,46 @@ if(MSVC)
 
       if(CMAKE_INSTALL_DEBUG_LIBRARIES)
         set(MSVC_MFC_DIR
-          "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugMFC")
+          "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.DebugMFC")
         set(__install__libs ${__install__libs}
-          "${MSVC_MFC_DIR}/mfc${v}0ud.dll"
-          "${MSVC_MFC_DIR}/mfcm${v}0ud.dll"
+          "${MSVC_MFC_DIR}/mfc${v}ud.dll"
+          "${MSVC_MFC_DIR}/mfcm${v}ud.dll"
           )
-        if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}0d.dll")
+        if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}d.dll")
           set(__install__libs ${__install__libs}
-            "${MSVC_MFC_DIR}/mfc${v}0d.dll"
-            "${MSVC_MFC_DIR}/mfcm${v}0d.dll"
+            "${MSVC_MFC_DIR}/mfc${v}d.dll"
+            "${MSVC_MFC_DIR}/mfcm${v}d.dll"
           )
         endif()
       endif()
 
-      set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFC")
+      set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFC")
       if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
         set(__install__libs ${__install__libs}
-          "${MSVC_MFC_DIR}/mfc${v}0u.dll"
-          "${MSVC_MFC_DIR}/mfcm${v}0u.dll"
+          "${MSVC_MFC_DIR}/mfc${v}u.dll"
+          "${MSVC_MFC_DIR}/mfcm${v}u.dll"
           )
-        if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}0.dll")
+        if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}.dll")
           set(__install__libs ${__install__libs}
-            "${MSVC_MFC_DIR}/mfc${v}0.dll"
-            "${MSVC_MFC_DIR}/mfcm${v}0.dll"
+            "${MSVC_MFC_DIR}/mfc${v}.dll"
+            "${MSVC_MFC_DIR}/mfcm${v}.dll"
           )
         endif()
       endif()
 
       # include the language dll's as well as the actuall dll's
-      set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFCLOC")
+      set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFCLOC")
       set(__install__libs ${__install__libs}
-        "${MSVC_MFCLOC_DIR}/mfc${v}0chs.dll"
-        "${MSVC_MFCLOC_DIR}/mfc${v}0cht.dll"
-        "${MSVC_MFCLOC_DIR}/mfc${v}0deu.dll"
-        "${MSVC_MFCLOC_DIR}/mfc${v}0enu.dll"
-        "${MSVC_MFCLOC_DIR}/mfc${v}0esn.dll"
-        "${MSVC_MFCLOC_DIR}/mfc${v}0fra.dll"
-        "${MSVC_MFCLOC_DIR}/mfc${v}0ita.dll"
-        "${MSVC_MFCLOC_DIR}/mfc${v}0jpn.dll"
-        "${MSVC_MFCLOC_DIR}/mfc${v}0kor.dll"
-        "${MSVC_MFCLOC_DIR}/mfc${v}0rus.dll"
+        "${MSVC_MFCLOC_DIR}/mfc${v}chs.dll"
+        "${MSVC_MFCLOC_DIR}/mfc${v}cht.dll"
+        "${MSVC_MFCLOC_DIR}/mfc${v}deu.dll"
+        "${MSVC_MFCLOC_DIR}/mfc${v}enu.dll"
+        "${MSVC_MFCLOC_DIR}/mfc${v}esn.dll"
+        "${MSVC_MFCLOC_DIR}/mfc${v}fra.dll"
+        "${MSVC_MFCLOC_DIR}/mfc${v}ita.dll"
+        "${MSVC_MFCLOC_DIR}/mfc${v}jpn.dll"
+        "${MSVC_MFCLOC_DIR}/mfc${v}kor.dll"
+        "${MSVC_MFCLOC_DIR}/mfc${v}rus.dll"
         )
     endif()
   endif()
@@ -425,24 +437,32 @@ if(MSVC)
   # Furthermore, there is no debug version of this
   if(CMAKE_INSTALL_OPENMP_LIBRARIES)
     if(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910)
-      set(_MSOMP_VERSION 140)
+      set(_MSOMP_DLL_VERSION 140)
+      set(_MSOMP_IDE_VERSION 14)
     elseif(MSVC_VERSION EQUAL 1800)
-      set(_MSOMP_VERSION 120)
+      set(_MSOMP_DLL_VERSION 120)
+      set(_MSOMP_IDE_VERSION 12)
     elseif(MSVC_VERSION EQUAL 1700)
-      set(_MSOMP_VERSION 110)
+      set(_MSOMP_DLL_VERSION 110)
+      set(_MSOMP_IDE_VERSION 11)
     elseif(MSVC_VERSION EQUAL 1600)
-      set(_MSOMP_VERSION 100)
+      set(_MSOMP_DLL_VERSION 100)
+      set(_MSOMP_IDE_VERSION 10)
     elseif(MSVC_VERSION EQUAL 1500)
-      set(_MSOMP_VERSION 90)
+      set(_MSOMP_DLL_VERSION 90)
+      set(_MSOMP_IDE_VERSION 9)
     elseif(MSVC_VERSION EQUAL 1400)
-      set(_MSOMP_VERSION 80)
+      set(_MSOMP_DLL_VERSION 80)
+      set(_MSOMP_IDE_VERSION 8)
     else()
-      set(_MSOMP_VERSION "")
+      set(_MSOMP_DLL_VERSION "")
+      set(_MSOMP_IDE_VERSION "")
     endif()
 
-    if(_MSOMP_VERSION)
-      set(v "${_MSOMP_VERSION}")
-      set(MSVC_OPENMP_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}.OPENMP")
+    if(_MSOMP_DLL_VERSION)
+      set(v "${_MSOMP_DLL_VERSION}")
+      set(vs "${_MSOMP_IDE_VERSION}")
+      set(MSVC_OPENMP_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.OPENMP")
 
       if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
         set(__install__libs ${__install__libs}

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d40fc8856d3cc3cd40e091d858df4fb1725f1406
commit d40fc8856d3cc3cd40e091d858df4fb1725f1406
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Thu Mar 23 09:31:25 2017 -0400
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Thu Mar 23 09:44:30 2017 -0400

    CUDA: ObjectLibrary test executable now runs on OSX

diff --git a/Tests/Cuda/ObjectLibrary/CMakeLists.txt b/Tests/Cuda/ObjectLibrary/CMakeLists.txt
index cbe1e67..1d93be7 100644
--- a/Tests/Cuda/ObjectLibrary/CMakeLists.txt
+++ b/Tests/Cuda/ObjectLibrary/CMakeLists.txt
@@ -10,3 +10,8 @@ add_library(CudaMixedObjectLib OBJECT static.cu static.cpp)
 add_executable(CudaObjectLibrary
                main.cpp
                $<TARGET_OBJECTS:CudaMixedObjectLib>)
+if(APPLE)
+  # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that
+  # the static cuda runtime can find it at runtime.
+  target_link_libraries(CudaObjectLibrary PRIVATE -Wl,-rpath,/usr/local/cuda/lib)
+endif()

-----------------------------------------------------------------------

Summary of changes:
 Modules/InstallRequiredSystemLibraries.cmake |  178 ++++++++++++++++----------
 Tests/Cuda/ObjectLibrary/CMakeLists.txt      |    5 +
 2 files changed, 114 insertions(+), 69 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list