Skip to content

Commit

Permalink
Fix pico builds (cmake 3.30)
Browse files Browse the repository at this point in the history
cmake 3.30 changed their private api.

Signed-off-by: Peter M <petermm@gmail.com>
  • Loading branch information
petermm committed Jul 16, 2024
1 parent 15a21c8 commit 8392791
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/platforms/rp2040/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../CMakeModules
pico_sdk_init()

# Pico SDK forces compiler, but we really want to know its features.
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompileFeatures.cmake)
CMAKE_DETERMINE_COMPILE_FEATURES(C)
# TODO: avoid using private api: https://discourse.cmake.org/t/cmakedeterminecompilerfeatures-cmake-is-no-more-in-3-30-bug-or-not/11176/3
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.30.0)
include(CMakeDetermineCompilerSupport)
cmake_determine_compiler_support(C)
else()
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompileFeatures.cmake)
CMAKE_DETERMINE_COMPILE_FEATURES(C)
endif()

enable_language( C CXX ASM )

Expand Down

0 comments on commit 8392791

Please sign in to comment.