2021-09-29 10:46:35 +00:00
|
|
|
include($ENV{IDF_PATH}/tools/cmake/utilities.cmake)
|
|
|
|
|
2021-09-10 16:47:46 +00:00
|
|
|
set(CMAKE_SYSTEM_NAME Generic)
|
|
|
|
|
|
|
|
set(CMAKE_C_COMPILER clang)
|
|
|
|
set(CMAKE_CXX_COMPILER clang++)
|
|
|
|
set(CMAKE_ASM_COMPILER clang)
|
|
|
|
|
2022-11-18 12:29:39 +00:00
|
|
|
set(CMAKE_AR llvm-ar)
|
|
|
|
set(CMAKE_RANLIB llvm-ranlib)
|
2021-09-10 16:47:46 +00:00
|
|
|
set(CMAKE_OBJDUMP xtensa-esp32-elf-objdump)
|
|
|
|
|
2022-11-18 12:29:39 +00:00
|
|
|
remove_duplicated_flags("--target=xtensa-esp-elf -mcpu=esp32 ${CMAKE_C_FLAGS}"
|
2022-01-06 03:17:29 +00:00
|
|
|
UNIQ_CMAKE_C_FLAGS)
|
|
|
|
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}"
|
|
|
|
CACHE STRING "C Compiler Base Flags"
|
|
|
|
FORCE)
|
|
|
|
|
2022-11-18 12:29:39 +00:00
|
|
|
remove_duplicated_flags("--target=xtensa-esp-elf -mcpu=esp32 \
|
|
|
|
${CMAKE_CXX_FLAGS}"
|
2022-01-06 03:17:29 +00:00
|
|
|
UNIQ_CMAKE_CXX_FLAGS)
|
|
|
|
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}"
|
|
|
|
CACHE STRING "C++ Compiler Base Flags"
|
|
|
|
FORCE)
|
|
|
|
|
2023-04-14 11:39:35 +00:00
|
|
|
remove_duplicated_flags("--target=xtensa-esp-elf -mcpu=esp32 -Xassembler --longcalls ${CMAKE_ASM_FLAGS}"
|
2022-11-18 12:29:39 +00:00
|
|
|
UNIQ_CMAKE_ASM_FLAGS)
|
2022-01-06 03:17:29 +00:00
|
|
|
set(CMAKE_ASM_FLAGS "${UNIQ_CMAKE_ASM_FLAGS}"
|
|
|
|
CACHE STRING "Assembler Base Flags"
|
|
|
|
FORCE)
|