Skip to content

Commit a701305

Browse files
committed
try do add conf
1 parent 3d50ff1 commit a701305

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/build-develop.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ jobs:
4949
- name: Detect Conan Profile
5050
run: |
5151
conan profile detect -f
52-
conan profile update 'conf.tools.build:cxxflags=["-include","vector"]' default
52+
grep -qxF '[conf]' build/profiles/default || echo '[conf]' >> build/profiles/default
53+
echo 'corrade/*:tools.build:cxxflags=["-include","vector"]' >> build/profiles/default
5354
5455
- name: Configure CMake
5556
shell: bash
@@ -110,7 +111,7 @@ jobs:
110111
run: sudo ctest --output-on-failure
111112

112113
build-win64:
113-
runs-on: windows-2019
114+
runs-on: windows-latest
114115
outputs:
115116
version_number: ${{ env.VERSION }}
116117
steps:

.github/workflows/build-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
prerelease: false
156156

157157
build-win64:
158-
runs-on: windows-2019
158+
runs-on: windows-latest
159159
outputs:
160160
version_number: ${{ env.VERSION }}
161161
steps:

cmake/conan_provider.cmake

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ function(detect_os os os_api_level os_sdk os_subsystem os_version)
5050
elseif(CMAKE_SYSTEM_NAME MATCHES "^MSYS")
5151
set(${os} Windows PARENT_SCOPE)
5252
set(${os_subsystem} msys2 PARENT_SCOPE)
53+
elseif(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
54+
# https://github.com/emscripten-core/emscripten/blob/4.0.6/cmake/Modules/Platform/Emscripten.cmake#L17C1-L17C34
55+
set(${os} Emscripten PARENT_SCOPE)
5356
else()
5457
set(${os} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
5558
endif()
@@ -123,6 +126,10 @@ function(detect_arch arch)
123126
elseif(host_arch MATCHES "AMD64|amd64|x86_64|x64")
124127
set(_arch x86_64)
125128
endif()
129+
if(EMSCRIPTEN)
130+
# https://github.com/emscripten-core/emscripten/blob/4.0.6/cmake/Modules/Platform/Emscripten.cmake#L294C1-L294C80
131+
set(_arch wasm)
132+
endif()
126133
message(STATUS "CMake-Conan: cmake_system_processor=${_arch}")
127134
set(${arch} ${_arch} PARENT_SCOPE)
128135
endfunction()
@@ -268,15 +275,15 @@ function(detect_compiler compiler compiler_version compiler_runtime compiler_run
268275

269276
elseif(_compiler MATCHES AppleClang)
270277
set(_compiler "apple-clang")
271-
string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
278+
string(REPLACE "." ";" VERSION_LIST ${_compiler_version})
272279
list(GET VERSION_LIST 0 _compiler_version)
273280
elseif(_compiler MATCHES Clang)
274281
set(_compiler "clang")
275-
string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
282+
string(REPLACE "." ";" VERSION_LIST ${_compiler_version})
276283
list(GET VERSION_LIST 0 _compiler_version)
277284
elseif(_compiler MATCHES GNU)
278285
set(_compiler "gcc")
279-
string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
286+
string(REPLACE "." ";" VERSION_LIST ${_compiler_version})
280287
list(GET VERSION_LIST 0 _compiler_version)
281288
endif()
282289

0 commit comments

Comments
 (0)