summaryrefslogtreecommitdiffstats
path: root/config/cmake/fileCompareTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/fileCompareTest.cmake')
-rw-r--r--config/cmake/fileCompareTest.cmake27
1 files changed, 18 insertions, 9 deletions
diff --git a/config/cmake/fileCompareTest.cmake b/config/cmake/fileCompareTest.cmake
index d913da0..2f968fa 100644
--- a/config/cmake/fileCompareTest.cmake
+++ b/config/cmake/fileCompareTest.cmake
@@ -24,9 +24,6 @@ endif ()
if (NOT TEST_FUNCTION)
message (FATAL_ERROR "Require TEST_FUNCTION (LT,LTEQ,EQ,GTEQ,GT) to be defined")
endif ()
-#if (NOT TEST_EXPECT)
-# message (STATUS "Require TEST_EXPECT to be defined")
-#endif ()
set (TEST_ONE_SIZE 0)
set (TEST_TWO_SIZE 0)
@@ -53,7 +50,9 @@ if (TEST_STRINGS STREQUAL "YES")
RESULT_VARIABLE TEST_RESULT
)
- message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}")
+ endif ()
# if the return value is !=${TEST_EXPECT} bail out
if (NOT TEST_RESULT EQUAL TEST_EXPECT)
message (FATAL_ERROR "Failed: The output of ${TEST_FOLDER}/${TEST_ONEFILE} did not match ${TEST_FOLDER}/${TEST_TWOFILE}.\n${TEST_ERROR}")
@@ -66,31 +65,41 @@ else ()
file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE)
if (TEST_FUNCTION MATCHES "LT")
if (TEST_ONE_SIZE LESS TEST_TWO_SIZE)
- message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
else ()
message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less ${TEST_FOLDER}/${TEST_TWOFILE}")
endif ()
elseif (TEST_FUNCTION MATCHES "LTEQ")
if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
- message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSES "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
else ()
message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
endif ()
elseif (TEST_FUNCTION MATCHES "EQ")
if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
- message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
else ()
message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT equal ${TEST_FOLDER}/${TEST_TWOFILE}")
endif ()
elseif (TEST_FUNCTION MATCHES "GTEQ")
if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
- message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
else ()
message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
endif ()
elseif (TEST_FUNCTION MATCHES "GT")
if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
- message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
else ()
message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater ${TEST_FOLDER}/${TEST_TWOFILE}")
endif ()