Skip to content

Commit

Permalink
CMake: Remove deprecation warnings
Browse files Browse the repository at this point in the history
Use CMAKE_C_COMPILER and CMAKE_CXX_COMPILER instead of CMAKE_FORCE_* to
set the cross compilers.

Signed-off-by: Ed Mooring <[email protected]>
  • Loading branch information
edmooring authored and arnopo committed May 19, 2022
1 parent 8bb3fa3 commit 23ba779
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmake/platforms/cross-generic-gcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER CACHE STRING "")
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER CACHE STRING "")
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER CACHE STRING "")

include (CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER ("${CROSS_PREFIX}gcc" GNU)
CMAKE_FORCE_CXX_COMPILER ("${CROSS_PREFIX}g++" GNU)
set (CMAKE_C_COMPILER "${CROSS_PREFIX}gcc")
set (CMAKE_CXX_COMPILER "${CROSS_PREFIX}g++")
# _exit is in the BSP rather than in libgcc, leaving this out
# causes errors in try_compile on ARM generic.
set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

# vim: expandtab:ts=2:sw=2:smartindent

0 comments on commit 23ba779

Please sign in to comment.