@@ -70,22 +70,21 @@ function(find_pmreorder)
7070 return ()
7171 endif ()
7272
73- if ((NOT (PMEMCHECK_VERSION LESS 1.0)) AND PMEMCHECK_VERSION LESS 2.0)
73+ if ((NOT (PMEMCHECK_VERSION VERSION_LESS 1.0)) AND PMEMCHECK_VERSION VERSION_LESS 2.0)
7474 find_program (PMREORDER names pmreorder HINTS ${LIBPMEMOBJ_PREFIX} /bin )
75- get_program_version_major_minor (${PMREORDER} PMREORDER_VERSION )
76- message (STATUS "pmreorder found: ${PMREORDER} , in version: ${PMREORDER_VERSION} " )
7775
78- if (PMREORDER_VERSION EQUAL PMREORDER_REQUIRED_VERSION OR PMREORDER_VERSION GREATER PMREORDER_REQUIRED_VERSION )
79- set (PROPER_PMREORDER_VERSION 1 )
80- endif ( )
76+ if (PMREORDER )
77+ get_program_version_major_minor ( ${PMREORDER} PMREORDER_VERSION )
78+ message ( STATUS "pmreorder found: ${PMREORDER} , in version: ${PMREORDER_VERSION} " )
8179
82- if (PMREORDER AND PROPER_PMREORDER_VERSION)
83- set (ENV{PATH } ${LIBPMEMOBJ_PREFIX} /bin:$ENV{PATH} )
84- set (PMREORDER_SUPPORTED true CACHE INTERNAL "pmreorder support" )
85- elseif (NOT PMREORDER)
80+ if (PMREORDER_VERSION VERSION_EQUAL PMREORDER_REQUIRED_VERSION OR PMREORDER_VERSION VERSION_GREATER PMREORDER_REQUIRED_VERSION)
81+ set (ENV{PATH } ${LIBPMEMOBJ_PREFIX} /bin:$ENV{PATH} )
82+ set (PMREORDER_SUPPORTED true CACHE INTERNAL "pmreorder support" )
83+ else ()
84+ message (WARNING "Pmreorder should be in version >= ${PMREORDER_REQUIRED_VERSION} - pmreorder tests will not be performed." )
85+ endif ()
86+ else ()
8687 message (WARNING "Pmreorder not found - pmreorder tests will not be performed." )
87- elseif (NOT PROPER_PMREORDER_VERSION)
88- message (WARNING "Pmreorder should be in version >= ${PMREORDER_REQUIRED_VERSION} - pmreorder tests will not be performed." )
8988 endif ()
9089 else ()
9190 message (WARNING "Pmemcheck must be installed in version 1.X for pmreorder to work - pmreorder tests will not be performed." )
0 commit comments