-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
55 lines (47 loc) · 1.49 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.13)
include(pico_sdk_import.cmake)
if(NOT DEFINED NO_NEXMON)
if(NOT DEFINED NEXMON_ROOT)
if(DEFINED ENV{NEXMON_ROOT})
set(NEXMON_ROOT $ENV{NEXMON_ROOT})
message("Using NEXMON_ROOT from environment ('${NEXMON_ROOT}')")
else()
message(FATAL_ERROR "NEXMON_ROOT or NO_NEXMON must be set.")
endif()
endif()
message("NEXMON_ROOT is ${NEXMON_ROOT}")
else()
message("Force no NEXMON (${NO_NEXMON}).")
endif()
project(pico_nexmon C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
if (PICO_SDK_VERSION_STRING VERSION_LESS "1.3.0")
message(FATAL_ERROR "Raspberry Pi Pico SDK version 1.3.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}")
endif()
set(PICO_NEXMON_PATH ${PROJECT_SOURCE_DIR})
set(PICO_BOARD "pico_w")
set(PICO_CYW43_DRIVER_PATH ${PROJECT_SOURCE_DIR}/cyw43-driver)
pico_sdk_init()
add_compile_options(-Wall
-Wno-format
-Wno-unused-function
-Wno-unused-local-typedefs
)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-maybe-uninitialized)
endif()
if (PICO_CYW43_SUPPORTED)
if (NOT TARGET pico_cyw43_arch)
message("Pico W support required")
else()
# specific projects in subdirectories
add_subdirectory(dump_rom)
add_subdirectory(dump_console)
if(NOT DEFINED NO_NEXMON)
add_subdirectory(ioctl_test)
else()
message("Exclude ioctl_test project as no NEXMON_ROOT given.")
endif()
endif()
endif()