summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-31 13:19:37 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-08-31 13:19:37 (GMT)
commit0820c7850805e7c41fd54292fa4ebd13b28b51fa (patch)
tree5a4007d69d55fdec2d5e0c9ac8885c26d0bade4c /Tests
parent5b1f9cd12703eca0505ee0b6d9d2a0e53ed86f67 (diff)
parentbf09271b656bb8110c40cd2d456acfaa3b4e4741 (diff)
downloadCMake-0820c7850805e7c41fd54292fa4ebd13b28b51fa.zip
CMake-0820c7850805e7c41fd54292fa4ebd13b28b51fa.tar.gz
CMake-0820c7850805e7c41fd54292fa4ebd13b28b51fa.tar.bz2
Merge topic 'FindMatlab-additional-components'
bf09271b FindMatlab: adding handling of component "MAT"
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt1
-rw-r--r--Tests/FindMatlab/components_checks/CMakeLists.txt23
2 files changed, 24 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 3d0f264..d6c96e1 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1415,6 +1415,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
if(CMake_TEST_FindMatlab)
ADD_TEST_MACRO(FindMatlab.basic_checks ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>)
ADD_TEST_MACRO(FindMatlab.versions_checks ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>)
+ ADD_TEST_MACRO(FindMatlab.components_checks ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>)
endif()
find_package(GTK2 QUIET)
diff --git a/Tests/FindMatlab/components_checks/CMakeLists.txt b/Tests/FindMatlab/components_checks/CMakeLists.txt
new file mode 100644
index 0000000..3dec093
--- /dev/null
+++ b/Tests/FindMatlab/components_checks/CMakeLists.txt
@@ -0,0 +1,23 @@
+
+cmake_minimum_required (VERSION 2.8.12)
+enable_testing()
+project(component_checks)
+
+set(MATLAB_FIND_DEBUG TRUE)
+
+# the success of the following command is dependent on the current configuration:
+# - on 32bits builds (cmake is building with 32 bits), it looks for 32 bits Matlab
+# - on 64bits builds (cmake is building with 64 bits), it looks for 64 bits Matlab
+find_package(Matlab REQUIRED COMPONENTS MX_LIBRARY ENG_LIBRARY MAT_LIBRARY MAIN_PROGRAM)
+
+message(STATUS "FindMatlab libraries: ${Matlab_LIBRARIES}")
+
+matlab_add_mex(
+ # target name
+ NAME cmake_matlab_test_wrapper1
+ # output name
+ OUTPUT_NAME cmake_matlab_mex1
+ SRC ${CMAKE_CURRENT_SOURCE_DIR}/../matlab_wrapper1.cpp
+ DOCUMENTATION ${CMAKE_CURRENT_SOURCE_DIR}/../help_text1.m.txt
+ LINK_TO ${Matlab_LIBRARIES}
+ )