IonizationChamber/Software/Firmware/sdcc-stm8.cmake

17 wiersze
537 B
CMake
Executable File

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Generic STM8 / SDCC toolchain --------------------------------------------
set(CMAKE_SYSTEM_NAME Generic)
# Compiler
set(CMAKE_C_COMPILER sdcc)
# Archiver *must* be SDCCs sdar, not GNU ar
set(CMAKE_AR sdar)
set(CMAKE_RANLIB sdar) # sdar -s adds the symbol table
# SDCC uses .rel for objects and .lib for libraries
set(CMAKE_C_OUTPUT_EXTENSION ".rel")
set(CMAKE_STATIC_LIBRARY_PREFIX "")
set(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
# Project-specific flags should be added with target_compile_options()/target_link_options()