From a42416e71c5abf3ec3cb1f9f045ae146b85e31fe Mon Sep 17 00:00:00 2001 From: "Rule Timothy (VM/EMT3)" Date: Tue, 20 Aug 2024 11:49:49 +0200 Subject: [PATCH] Add linux-i386 build target. Signed-off-by: Rule Timothy (VM/EMT3) --- .github/workflows/ci.yaml | 2 ++ extra/cmake/linux-i386.cmake | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 extra/cmake/linux-i386.cmake diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e0b8607..be7610a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,6 +26,7 @@ jobs: package_arch: - linux-amd64 - linux-x86 + - linux-i386 - windows-x86 - windows-x64 container: @@ -97,6 +98,7 @@ jobs: package_arch: - linux-amd64 - linux-x86 + - linux-i386 - windows-x86 - windows-x64 steps: diff --git a/extra/cmake/linux-i386.cmake b/extra/cmake/linux-i386.cmake new file mode 100644 index 0000000..771a58f --- /dev/null +++ b/extra/cmake/linux-i386.cmake @@ -0,0 +1,17 @@ +# Target: Linux i386 + +set(CMAKE_SYSTEM_NAME Linux) +set(CDEF_PLATFORM_OS linux) # Available via dse/clib/platform.h. +set(CDEF_PLATFORM_ARCH i386) # Available via dse/clib/platform.h. + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") + + +# Enable CCache if available. +# Trigger secondary storage by setting environment variables: +# CCACHE_SECONDARY_STORAGE=redis://YOUR_SERVER +find_program(CCACHE_PROGRAM ccache) +if(CCACHE_PROGRAM) + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") +endif()