diff options
author | Cris Luengo <cris.l.luengo@gmail.com> | 2018-10-22 08:19:04 (GMT) |
---|---|---|
committer | Cris Luengo <cris.l.luengo@gmail.com> | 2018-10-24 06:09:06 (GMT) |
commit | 160499296c61b0edf2e6b08c44b31444e022528f (patch) | |
tree | 416376babb083f6b3aeeff3831e4111264be4071 /Tests/CMakeLists.txt | |
parent | ee7e97a7d35a793985cf6f9aa185069460cf0ec6 (diff) | |
download | CMake-160499296c61b0edf2e6b08c44b31444e022528f.zip CMake-160499296c61b0edf2e6b08c44b31444e022528f.tar.gz CMake-160499296c61b0edf2e6b08c44b31444e022528f.tar.bz2 |
FindMatlab: added unit tests for new functionality.
Also allowing a way to select which of multiple installed MATLAB versions to use in the test.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 71928a9..c7cfa86 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1493,13 +1493,18 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release # Matlab module # CMake_TEST_FindMatlab: indicates to look for Matlab (from PATH for Linux) + # CMake_TEST_FindMatlab_ROOT_DIR: indicates an optional root directory for Matlab, allows to select a version. # CMake_TEST_FindMatlab_MCR: indicates the MCR is installed # CMake_TEST_FindMatlab_MCR_ROOT_DIR: indicates an optional root directory for the MCR, required on Linux - if(CMake_TEST_FindMatlab OR CMake_TEST_FindMatlab_MCR OR (NOT "${CMake_TEST_FindMatlab_MCR_ROOT_DIR}" STREQUAL "")) + if(CMake_TEST_FindMatlab OR (NOT "${CMake_TEST_FindMatlab_ROOT_DIR}" STREQUAL "") OR + CMake_TEST_FindMatlab_MCR OR (NOT "${CMake_TEST_FindMatlab_MCR_ROOT_DIR}" STREQUAL "")) set(FindMatlab_additional_test_options ) if(CMake_TEST_FindMatlab_MCR OR NOT "${CMake_TEST_FindMatlab_MCR_ROOT_DIR}" STREQUAL "") set(FindMatlab_additional_test_options -DIS_MCR=TRUE) endif() + if(NOT "${CMake_TEST_FindMatlab_ROOT_DIR}" STREQUAL "") + set(FindMatlab_additional_test_options ${FindMatlab_additional_test_options} "-DMatlab_ROOT_DIR=${CMake_TEST_FindMatlab_ROOT_DIR}") + endif() if(NOT "${CMake_TEST_FindMatlab_MCR_ROOT_DIR}" STREQUAL "") set(FindMatlab_additional_test_options ${FindMatlab_additional_test_options} "-DMCR_ROOT:FILEPATH=${CMake_TEST_FindMatlab_MCR_ROOT_DIR}") endif() @@ -1511,6 +1516,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ADD_TEST_MACRO(FindMatlab.components_checks ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>) set(FindMatlab.failure_reports_BUILD_OPTIONS ${FindMatlab_additional_test_options}) ADD_TEST_MACRO(FindMatlab.failure_reports ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>) + set(FindMatlab.r2018a_check_BUILD_OPTIONS ${FindMatlab_additional_test_options}) + ADD_TEST_MACRO(FindMatlab.r2018a_check ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>) endif() find_package(GTK2 QUIET) |