From 6b733b8c5b223ecc0d36e8628b65cb2895437bb8 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Mon, 3 Jan 2022 20:50:32 -0600 Subject: [PATCH] Automatically detect the host platform in CMakeLists.txt (#929) Previously, "linux" was hardcoded in the root CMakeLists.txt, so it was impossible to build on anything but Linux, even when specifying WAMR_BUILD_PLATFORM. Signed-off-by: Piotr Sikora --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d77473e03..bc74e7273 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required (VERSION 2.8...3.16) project (iwasm) # set (CMAKE_VERBOSE_MAKEFILE 1) -set (WAMR_BUILD_PLATFORM "linux") +string (TOLOWER ${CMAKE_HOST_SYSTEM_NAME} WAMR_BUILD_PLATFORM) # Reset default linker flags set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")