From ef3cc50508f85556147f2816406dbb20a52d462d Mon Sep 17 00:00:00 2001 From: Stu Cao Date: Fri, 17 Jun 2022 15:39:45 -0700 Subject: [PATCH] Update docker build to work for rpm. Skip CMake compiler check --- ci/build_wamr.sh | 3 ++- samples/basic/CMakeLists.txt | 3 +++ samples/multi-module/CMakeLists.txt | 3 +++ samples/multi-thread/CMakeLists.txt | 3 +++ samples/native-lib/CMakeLists.txt | 3 +++ samples/ref-types/CMakeLists.txt | 3 +++ samples/simple/CMakeLists.txt | 3 +++ samples/socket-api/CMakeLists.txt | 3 +++ samples/spawn-thread/CMakeLists.txt | 3 +++ samples/wasm-c-api/CMakeLists.txt | 3 +++ 10 files changed, 29 insertions(+), 1 deletion(-) diff --git a/ci/build_wamr.sh b/ci/build_wamr.sh index b7e6c049d..438350e4a 100755 --- a/ci/build_wamr.sh +++ b/ci/build_wamr.sh @@ -5,7 +5,8 @@ readonly CURRENT_PATH=$(dirname "$(realpath "$0")") readonly ROOT=$(realpath "${CURRENT_PATH}/..") -readonly VARIANT=$(lsb_release -c | awk '{print $2}') +# readonly VARIANT=$(lsb_release -c | awk '{print $2}') +readonly VARIANT="karoo" docker build \ --memory=4G --cpu-quota=50000 \ diff --git a/samples/basic/CMakeLists.txt b/samples/basic/CMakeLists.txt index 7e10d4609..680f1448b 100644 --- a/samples/basic/CMakeLists.txt +++ b/samples/basic/CMakeLists.txt @@ -3,6 +3,9 @@ cmake_minimum_required (VERSION 2.8) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + if (NOT WAMR_BUILD_PLATFORM STREQUAL "windows") project (basic) else() diff --git a/samples/multi-module/CMakeLists.txt b/samples/multi-module/CMakeLists.txt index e3edd0476..c002a8672 100644 --- a/samples/multi-module/CMakeLists.txt +++ b/samples/multi-module/CMakeLists.txt @@ -4,6 +4,9 @@ cmake_minimum_required (VERSION 2.8...3.16) project(multi_module) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + ################ runtime settings ################ string (TOLOWER ${CMAKE_HOST_SYSTEM_NAME} WAMR_BUILD_PLATFORM) if (APPLE) diff --git a/samples/multi-thread/CMakeLists.txt b/samples/multi-thread/CMakeLists.txt index 89c983862..ee2277aa8 100644 --- a/samples/multi-thread/CMakeLists.txt +++ b/samples/multi-thread/CMakeLists.txt @@ -4,6 +4,9 @@ cmake_minimum_required(VERSION 2.8) project(pthread) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + ################ runtime settings ################ string (TOLOWER ${CMAKE_HOST_SYSTEM_NAME} WAMR_BUILD_PLATFORM) if (APPLE) diff --git a/samples/native-lib/CMakeLists.txt b/samples/native-lib/CMakeLists.txt index 3968393c6..041151625 100644 --- a/samples/native-lib/CMakeLists.txt +++ b/samples/native-lib/CMakeLists.txt @@ -4,6 +4,9 @@ cmake_minimum_required(VERSION 3.0) project(native_lib) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + ################ runtime settings ############## string (TOLOWER ${CMAKE_HOST_SYSTEM_NAME} WAMR_BUILD_PLATFORM) if (APPLE) diff --git a/samples/ref-types/CMakeLists.txt b/samples/ref-types/CMakeLists.txt index 229afd3c4..c139a22cc 100644 --- a/samples/ref-types/CMakeLists.txt +++ b/samples/ref-types/CMakeLists.txt @@ -3,6 +3,9 @@ cmake_minimum_required (VERSION 2.8) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + if (NOT WAMR_BUILD_PLATFORM STREQUAL "windows") project(ref-types) else() diff --git a/samples/simple/CMakeLists.txt b/samples/simple/CMakeLists.txt index 5f0ce725d..ee099a250 100644 --- a/samples/simple/CMakeLists.txt +++ b/samples/simple/CMakeLists.txt @@ -5,6 +5,9 @@ cmake_minimum_required (VERSION 2.8) project (simple) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + ################ wamr runtime settings ################ message(STATUS "WAMR_BUILD_SDK_PROFILE=${WAMR_BUILD_SDK_PROFILE}") diff --git a/samples/socket-api/CMakeLists.txt b/samples/socket-api/CMakeLists.txt index 936287c7d..8b7043327 100644 --- a/samples/socket-api/CMakeLists.txt +++ b/samples/socket-api/CMakeLists.txt @@ -4,6 +4,9 @@ cmake_minimum_required(VERSION 2.8...3.18) project(socket_api_sample) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + ####################################### ## Detect toolchain ####################################### diff --git a/samples/spawn-thread/CMakeLists.txt b/samples/spawn-thread/CMakeLists.txt index 794ec2aa2..d93f071dc 100644 --- a/samples/spawn-thread/CMakeLists.txt +++ b/samples/spawn-thread/CMakeLists.txt @@ -4,6 +4,9 @@ cmake_minimum_required(VERSION 2.8) project(spawn_thread) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + ################ runtime settings ################ string (TOLOWER ${CMAKE_HOST_SYSTEM_NAME} WAMR_BUILD_PLATFORM) if (APPLE) diff --git a/samples/wasm-c-api/CMakeLists.txt b/samples/wasm-c-api/CMakeLists.txt index c395b627a..cfc8ad063 100644 --- a/samples/wasm-c-api/CMakeLists.txt +++ b/samples/wasm-c-api/CMakeLists.txt @@ -3,6 +3,9 @@ cmake_minimum_required (VERSION 2.8) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + if (NOT WAMR_BUILD_PLATFORM STREQUAL "windows") project(c-api) else()