forked from raspberrypi/pico-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
if (DEFINED PICO_SDK_PATH) | ||
pico_sdk_init() | ||
else() | ||
message(FATAL_ERROR "Must use the toolchain file at ${CMAKE_CURRENT_LIST_DIR}/pico_toolchain_file.cmake, else pico-sdk project will not build") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
set(CMAKE_SYSTEM_NAME PICO) | ||
|
||
if (NOT DEFINED PICO_PREVIOUS_CMAKE_TOOLCHAIN_FILE) | ||
unset(CMAKE_TOOLCHAIN_FILE CACHE) | ||
else() | ||
set(CMAKE_TOOLCHAIN_FILE ${PICO_PREVIOUS_CMAKE_TOOLCHAIN_FILE}) | ||
endif() | ||
|
||
if (${PROJECT_NAME} MATCHES "CMAKE_TRY_COMPILE") | ||
# Don't log toolchain searches when testing compiler | ||
set(CMAKE_MESSAGE_LOG_LEVEL ERROR) | ||
endif() | ||
include(${CMAKE_CURRENT_LIST_DIR}/../pico_sdk_init.cmake) | ||
|
||
message("Toolchain file now ${CMAKE_TOOLCHAIN_FILE}") | ||
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_TOOLCHAIN_FILE}" CACHE FILEPATH "") | ||
include(${CMAKE_TOOLCHAIN_FILE}) |