[libcompat] CMakeLists.txt: Update the regular expressions.
authorDavid Korth <gerbilsoft@gerbilsoft.com>
Wed, 2 Sep 2015 04:43:20 +0000 (00:43 -0400)
committerDavid Korth <gerbilsoft@gerbilsoft.com>
Wed, 2 Sep 2015 04:43:20 +0000 (00:43 -0400)
This matches the version used in cmake/platform/msvc.cmake.

Specify 'arch' instead of "${arch}", since the MATCHES operator can
take a variable name in addition to a plain string.

src/libcompat/CMakeLists.txt

index c9e4bb8..21c269a 100644 (file)
@@ -69,12 +69,12 @@ IF(NOT DEFINED libcompat_ARCH_SPECIFIC_SRCS)
                MESSAGE(FATAL_ERROR "CMAKE_SYSTEM_PROCESSOR is empty.")
        ENDIF(NOT CMAKE_SYSTEM_PROCESSOR)
        STRING(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" arch)
-       IF("${arch}" MATCHES i[0-9]86|x86|x86_64|amd64)
+       IF(arch MATCHES "^(i.|x)86$|^x86_64$|^amd64$")
                SET(libcompat_ARCH_SPECIFIC_SRCS
                        cpuflags_x86.c
                        byteswap_x86.c
                        )
-       ELSEIF("${arch}" MATCHES powerpc|powerpc-eabi)
+       ELSEIF(arch MATCHES "powerpc|powerpc-eabi")
                SET(libcompat_ARCH_SPECIFIC_SRCS
                        cpuflags_ppc.c
                        byteswap.c