From daed5edd6ea164b2ed0e9de91f1c9104fd75cd0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 25 Aug 2021 12:07:01 +0200 Subject: [PATCH] Simplify CMake if-statement variable references Variables in CMake if-statements (and only in if-statements) do not need to be explicitly dereferenced; a thing I did not always know. --- CMake/GenerateMappings.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMake/GenerateMappings.cmake b/CMake/GenerateMappings.cmake index 5e5aad3d..e29bb4a8 100644 --- a/CMake/GenerateMappings.cmake +++ b/CMake/GenerateMappings.cmake @@ -23,18 +23,18 @@ endif() file(STRINGS "${source_path}" lines) foreach(line ${lines}) - if ("${line}" MATCHES "^[0-9a-fA-F].*$") - if ("${line}" MATCHES "platform:Windows") + if (line MATCHES "^[0-9a-fA-F].*$") + if (line MATCHES "platform:Windows") if (GLFW_WIN32_MAPPINGS) set(GLFW_WIN32_MAPPINGS "${GLFW_WIN32_MAPPINGS}\n") endif() set(GLFW_WIN32_MAPPINGS "${GLFW_WIN32_MAPPINGS}\"${line}\",") - elseif ("${line}" MATCHES "platform:Mac OS X") + elseif (line MATCHES "platform:Mac OS X") if (GLFW_COCOA_MAPPINGS) set(GLFW_COCOA_MAPPINGS "${GLFW_COCOA_MAPPINGS}\n") endif() set(GLFW_COCOA_MAPPINGS "${GLFW_COCOA_MAPPINGS}\"${line}\",") - elseif ("${line}" MATCHES "platform:Linux") + elseif (line MATCHES "platform:Linux") if (GLFW_LINUX_MAPPINGS) set(GLFW_LINUX_MAPPINGS "${GLFW_LINUX_MAPPINGS}\n") endif()