summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-01-18 18:16:38 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-01-18 18:16:38 (GMT)
commit8adbf2552b34bd9bacf47b1196990cf568a9156e (patch)
tree7dc395e6c8a68227418861bfad1fa82fcee5ae7e /config/cmake_ext_mod
parentf25e78ad4216a776b0166a016a7abedd85e219e6 (diff)
downloadhdf5-8adbf2552b34bd9bacf47b1196990cf568a9156e.zip
hdf5-8adbf2552b34bd9bacf47b1196990cf568a9156e.tar.gz
hdf5-8adbf2552b34bd9bacf47b1196990cf568a9156e.tar.bz2
Fix CMake policy 54 warnings
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r--config/cmake_ext_mod/grepTest.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index b812d73..1417204 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -57,15 +57,15 @@ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
# TEST_REFERENCE should always be matched
string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
-if ("${TEST_RESULT}" STREQUAL "0")
+if (NOT TEST_RESULT)
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
endif ()
string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
-if ("${TEST_EXPECT}" STREQUAL "1")
- # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
+if (TEST_EXPECT)
+ # TEST_EXPECT (1) interprets TEST_FILTER as; NOT to match
string (LENGTH "${TEST_MATCH}" TEST_RESULT)
- if (NOT "${TEST_RESULT}" STREQUAL "0")
+ if (TEST_RESULT)
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
endif ()
endif ()