Skip to content
Merged
4 changes: 2 additions & 2 deletions .github/workflows/build-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake/conan_provider.cmake
run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake/conan_provider.cmake -DCONAN_INSTALL_ARGS="--build=missing;-c=corrade/*:tools.build:cxxflags=['-include','vector']"

- name: Build
working-directory: ${{github.workspace}}/build
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
run: sudo ctest --output-on-failure

build-win64:
runs-on: windows-2019
runs-on: windows-latest
outputs:
version_number: ${{ env.VERSION }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
prerelease: false

build-win64:
runs-on: windows-2019
runs-on: windows-latest
outputs:
version_number: ${{ env.VERSION }}
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:
include:
- arch: x86_64
conan_arch: x86_64
toolchain: http://musl.cc/x86_64-linux-musl-cross.tgz
toolchain: https://github.com/netboxlabs/pktvisor/releases/download/toolchains/x86_64-linux-musl-cross.tgz
cc: x86_64-linux-musl-gcc
cxx: x86_64-linux-musl-g++
ldflags: "-static"
# - arch: armv7lh # ARMv7 little-endian hard-float
# conan_arch: armv7hf
# toolchain: http://musl.cc/armv7l-linux-musleabihf-cross.tgz
# toolchain: https://github.com/netboxlabs/pktvisor/releases/download/toolchains/armv7l-linux-musleabihf-cross.tgz
# cc: armv7l-linux-musleabihf-gcc
# cxx: armv7l-linux-musleabihf-g++
- arch: aarch64
conan_arch: armv8
toolchain: http://musl.cc/aarch64-linux-musl-cross.tgz
toolchain: https://github.com/netboxlabs/pktvisor/releases/download/toolchains/aarch64-linux-musl-cross.tgz
cc: aarch64-linux-musl-gcc
cxx: aarch64-linux-musl-g++
ldflags: "-static"
Expand Down
13 changes: 10 additions & 3 deletions cmake/conan_provider.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ function(detect_os os os_api_level os_sdk os_subsystem os_version)
elseif(CMAKE_SYSTEM_NAME MATCHES "^MSYS")
set(${os} Windows PARENT_SCOPE)
set(${os_subsystem} msys2 PARENT_SCOPE)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
# https://github.com/emscripten-core/emscripten/blob/4.0.6/cmake/Modules/Platform/Emscripten.cmake#L17C1-L17C34
set(${os} Emscripten PARENT_SCOPE)
else()
set(${os} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
endif()
Expand Down Expand Up @@ -123,6 +126,10 @@ function(detect_arch arch)
elseif(host_arch MATCHES "AMD64|amd64|x86_64|x64")
set(_arch x86_64)
endif()
if(EMSCRIPTEN)
# https://github.com/emscripten-core/emscripten/blob/4.0.6/cmake/Modules/Platform/Emscripten.cmake#L294C1-L294C80
set(_arch wasm)
endif()
message(STATUS "CMake-Conan: cmake_system_processor=${_arch}")
set(${arch} ${_arch} PARENT_SCOPE)
endfunction()
Expand Down Expand Up @@ -268,15 +275,15 @@ function(detect_compiler compiler compiler_version compiler_runtime compiler_run

elseif(_compiler MATCHES AppleClang)
set(_compiler "apple-clang")
string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
string(REPLACE "." ";" VERSION_LIST ${_compiler_version})
list(GET VERSION_LIST 0 _compiler_version)
elseif(_compiler MATCHES Clang)
set(_compiler "clang")
string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
string(REPLACE "." ";" VERSION_LIST ${_compiler_version})
list(GET VERSION_LIST 0 _compiler_version)
elseif(_compiler MATCHES GNU)
set(_compiler "gcc")
string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
string(REPLACE "." ";" VERSION_LIST ${_compiler_version})
list(GET VERSION_LIST 0 _compiler_version)
endif()

Expand Down
Loading