From 12434e78e4478b8d098793a382db109e54cee0e8 Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:55:37 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Improve=20CMakeLists.txt=20(#267?= =?UTF-8?q?00)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/share/cmake/CMakeLists.txt b/buildroot/share/cmake/CMakeLists.txt index 0316c7fc0b..09b5b6f1bf 100644 --- a/buildroot/share/cmake/CMakeLists.txt +++ b/buildroot/share/cmake/CMakeLists.txt @@ -82,7 +82,7 @@ message("-- Running CMake version: " ${CMAKE_VERSION}) # Replace the CMake Ver. in the Arduino.cmake file(READ "${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/Platform/Arduino.cmake" ORIGINAL_FILE_CONTENTS) -string(REPLACE "cmake_minimum_required(VERSION 2.8.5)" "cmake_minimum_required(VERSION 3.5)" NEW_FILE_CONTENTS "${ORIGINAL_FILE_CONTENTS}") +string(REGEX REPLACE "cmake_minimum_required\\(VERSION[^\n]*\n" "cmake_minimum_required(VERSION 3.5)\n" NEW_FILE_CONTENTS "${ORIGINAL_FILE_CONTENTS}") file(WRITE "${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/Platform/Arduino.cmake" "${NEW_FILE_CONTENTS}") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/modules)