Skip to content

Commit 510a989

Browse files
committed
Fix
1 parent 8d90843 commit 510a989

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

cmake/conan.cmake

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,16 @@ endif()
8282
set(CONAN_VERBOSITY "error")
8383
set(CONAN_BINARY_DIR "${CMAKE_BINARY_DIR}/conan2")
8484

85-
if(NOT DEFINED CONAN_PROFILE)
85+
# Check if a custom host profile is provided (e.g., for cross-compilation)
86+
if(DEFINED CONAN_PROFILE_HOST AND EXISTS "${CONAN_PROFILE_HOST}")
87+
message(STATUS "CONAN_PROFILE: Using custom host profile: ${CONAN_PROFILE_HOST}")
88+
# Override the CACHE variables that conan_provider.cmake uses
89+
set(CONAN_HOST_PROFILE "${CONAN_PROFILE_HOST}" CACHE STRING "Conan host profile" FORCE)
90+
set(CONAN_BUILD_PROFILE "default" CACHE STRING "Conan build profile" FORCE)
91+
elseif(NOT DEFINED CONAN_PROFILE)
8692
guess_conan_profile()
8793
endif()
88-
message(VERBOSE "CONAN_PROFILE: ${CONAN_PROFILE}")
94+
message(STATUS "CONAN_PROFILE: ${CONAN_PROFILE}")
8995
# set(CONAN_PROFILE_PATH "${CMAKE_SOURCE_DIR}/cmake/profiles/${CONAN_PROFILE}")
9096
# set(CONAN_HOST_PROFILE "${CONAN_PROFILE_PATH}")
9197
# set(CONAN_BUILD_PROFILE "${CONAN_PROFILE_PATH}")

qemu_runner/conan/profiles/riscv32im.conan.profile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[settings]
22
os=baremetal
33
arch=riscv32
4-
compiler=riscv-none-elf-gcc
4+
compiler=gcc
55
compiler.version=15
66
compiler.libcxx=libstdc++11
77
compiler.cppstd=gnu23

0 commit comments

Comments
 (0)