diff options
author | Brad King <brad.king@kitware.com> | 2017-01-26 15:09:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-01-26 15:09:55 (GMT) |
commit | 1a2a9b0d08c7ba2af168856b1220d42ff9a80921 (patch) | |
tree | 21d8e8913b298d5012a9c23acc9b55afcf5a0c53 /Tests/GeneratorExpression/check-part3.cmake | |
parent | a45de72cc437a13179e933509d524d2088a86002 (diff) | |
download | CMake-1a2a9b0d08c7ba2af168856b1220d42ff9a80921.zip CMake-1a2a9b0d08c7ba2af168856b1220d42ff9a80921.tar.gz CMake-1a2a9b0d08c7ba2af168856b1220d42ff9a80921.tar.bz2 |
Tests: Simplify GeneratorExpression imported include directory check
Do not duplicate the list of include directories 4 times.
Diffstat (limited to 'Tests/GeneratorExpression/check-part3.cmake')
-rw-r--r-- | Tests/GeneratorExpression/check-part3.cmake | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/Tests/GeneratorExpression/check-part3.cmake b/Tests/GeneratorExpression/check-part3.cmake index e12d8c6..927ead4 100644 --- a/Tests/GeneratorExpression/check-part3.cmake +++ b/Tests/GeneratorExpression/check-part3.cmake @@ -8,18 +8,15 @@ check(test_version_less_2 "1") check(test_version_equal_1 "0") check(test_version_equal_2 "1") -foreach(c debug release relwithdebinfo minsizerel) - if(config AND NOT config STREQUAL NoConfig) - if(NOT "${test_imported_${c}}" MATCHES "^;/imported2/include$" - AND NOT "${test_imported_${c}}" MATCHES "^/imported1/include;$") - message(SEND_ERROR "test_imported_${c} is not correct: ${test_imported_${c}}") - endif() - else() - if(NOT "${test_imported_${c}}" MATCHES "^;$") - message(SEND_ERROR "test_imported_${c} is not an empty list: ${test_imported_${c}}") - endif() +if(config AND NOT config STREQUAL NoConfig) + if(NOT "${test_imported_includes}" MATCHES "^;*/imported[12]/include;*$") + message(SEND_ERROR "test_imported_includes is not correct: ${test_imported_includes}") endif() -endforeach() +else() + if(NOT "${test_imported_includes}" MATCHES "^;$") + message(SEND_ERROR "test_imported_includes is not an empty list: ${test_imported_includes}") + endif() +endif() check(test_imported_fallback "1") |