summaryrefslogtreecommitdiffstats
path: root/Modules/FindMatlab.cmake
diff options
context:
space:
mode:
authorJob Noorman <job.noorman@septentrio.com>2017-09-05 10:14:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-08 13:53:27 (GMT)
commitf34ac1c69b3ab0f6e3565c1c9ff7ebbd69bcab9a (patch)
treeb658b81292b4dd6f0702348b328aed8739ca3055 /Modules/FindMatlab.cmake
parentad1b9eba85ddb5bc51f862b4001bab6600006ddb (diff)
downloadCMake-f34ac1c69b3ab0f6e3565c1c9ff7ebbd69bcab9a.zip
CMake-f34ac1c69b3ab0f6e3565c1c9ff7ebbd69bcab9a.tar.gz
CMake-f34ac1c69b3ab0f6e3565c1c9ff7ebbd69bcab9a.tar.bz2
FindMatlab: Don't use the deprecated variable CMAKE_CL_64
The variable is not defined on 64-bit MinGW, causing a 32-bit Matlab version to be found. Check using CMAKE_SIZEOF_VOID_P instead.
Diffstat (limited to 'Modules/FindMatlab.cmake')
-rw-r--r--Modules/FindMatlab.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index cd8246d..7493281 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -1134,7 +1134,14 @@ else()
# testing if we are able to extract the needed information from the registry
set(_matlab_versions_from_registry)
- matlab_extract_all_installed_versions_from_registry(CMAKE_CL_64 _matlab_versions_from_registry)
+
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_matlab_win64 ON)
+ else()
+ set(_matlab_win64 OFF)
+ endif()
+
+ matlab_extract_all_installed_versions_from_registry(_matlab_win64 _matlab_versions_from_registry)
# the returned list is empty, doing the search on all known versions
if(NOT _matlab_versions_from_registry)