summaryrefslogtreecommitdiffstats
path: root/Modules/FindMatlab.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/FindMatlab.cmake
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadCMake-9db3116226cb99fcf54e936c833953abcde9b729.zip
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.bz2
Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
Diffstat (limited to 'Modules/FindMatlab.cmake')
-rw-r--r--Modules/FindMatlab.cmake24
1 files changed, 12 insertions, 12 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 20dc1da..8038488 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -23,22 +23,22 @@ set(MATLAB_FOUND 0)
if(WIN32)
if(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
set(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc60")
- else(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
+ else()
if(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
# Assume people are generally using 7.1,
# if using 7.0 need to link to: ../extern/lib/win32/microsoft/msvc70
set(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc71")
- else(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
+ else()
if(${CMAKE_GENERATOR} MATCHES "Borland")
# Same here, there are also: bcc50 and bcc51 directories
set(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/bcc54")
- else(${CMAKE_GENERATOR} MATCHES "Borland")
+ else()
if(MATLAB_FIND_REQUIRED)
message(FATAL_ERROR "Generator not compatible: ${CMAKE_GENERATOR}")
- endif(MATLAB_FIND_REQUIRED)
- endif(${CMAKE_GENERATOR} MATCHES "Borland")
- endif(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
- endif(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
+ endif()
+ endif()
+ endif()
+ endif()
find_library(MATLAB_MEX_LIBRARY
libmex
${MATLAB_ROOT}
@@ -56,7 +56,7 @@ if(WIN32)
"mex.h"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/include"
)
-else( WIN32 )
+else()
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
# Regular x86
set(MATLAB_ROOT
@@ -65,7 +65,7 @@ else( WIN32 )
$ENV{HOME}/matlab-7sp1/bin/glnx86/
$ENV{HOME}/redhat-matlab/bin/glnx86/
)
- else(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ else()
# AMD64:
set(MATLAB_ROOT
/usr/local/matlab-7sp1/bin/glnxa64/
@@ -74,7 +74,7 @@ else( WIN32 )
$ENV{HOME}/matlab-7sp1/bin/glnxa64/
$ENV{HOME}/redhat-matlab/bin/glnxa64/
)
- endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ endif()
find_library(MATLAB_MEX_LIBRARY
mex
${MATLAB_ROOT}
@@ -95,7 +95,7 @@ else( WIN32 )
"$ENV{HOME}/redhat-matlab/extern/include/"
)
-endif(WIN32)
+endif()
# This is common to UNIX and Win32:
set(MATLAB_LIBRARIES
@@ -106,7 +106,7 @@ set(MATLAB_LIBRARIES
if(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
set(MATLAB_FOUND 1)
-endif(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
+endif()
mark_as_advanced(
MATLAB_LIBRARIES