Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common cross compiler configuration #16

Open
jw3 opened this issue Nov 9, 2019 · 0 comments
Open

Common cross compiler configuration #16

jw3 opened this issue Nov 9, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@jw3
Copy link
Owner

jw3 commented Nov 9, 2019

This is being copied around in every client project and should be moved up to commons

if (NOT CROSS_COMPILER_PREFIX)
    set(CROSS_COMPILER_PREFIX "/usr/local/gcc-arm")
endif ()

set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

set(CMAKE_C_COMPILER "${CROSS_COMPILER_PREFIX}/bin/arm-none-eabi-gcc")
set(CMAKE_CXX_COMPILER "${CROSS_COMPILER_PREFIX}/bin/arm-none-eabi-g++")
set(CMAKE_ASM_COMPILER "${CROSS_COMPILER_PREFIX}/bin/arm-none-eabi-as")
set(CMAKE_AR "${CROSS_COMPILER_PREFIX}/bin/arm-none-eabi-ar" CACHE FILEPATH "Archiver")
set(CMAKE_RANLIB "${CROSS_COMPILER_PREFIX}/bin/arm-none-eabi-ranlib")
@jw3 jw3 added the enhancement New feature or request label Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant