Fix various typos in CMake CONFIG lines. Also add a script that found some of these errors. (#907)
This commit is contained in:
@ -13,8 +13,8 @@ endmacro()
|
||||
# PICO_CMAKE_CONFIG: PICO_CONFIG_HEADER_FILES, List of extra header files to include from pico/config.h for all platforms, type=list, default="", group=pico_base
|
||||
add_header_content_from_var(PICO_CONFIG_HEADER_FILES)
|
||||
|
||||
# PICO_CMAKE_CONFIG: PICO_CONFIG_RP2040_HEADER_FILES, List of extra header files to include from pico/config.h for rp2040 platform, type=list, default="", group=pico_base
|
||||
# PICO_CMAKE_CONFIG: PICO_CONFIG_HOST_HEADER_FILES, List of extra header files to include from pico/config.h for host platform, type=list, default="", group=pico_base
|
||||
# PICO_CMAKE_CONFIG: PICO_RP2040_CONFIG_HEADER_FILES, List of extra header files to include from pico/config.h for rp2040 platform, type=list, default="", group=pico_base
|
||||
# PICO_CMAKE_CONFIG: PICO_HOST_CONFIG_HEADER_FILES, List of extra header files to include from pico/config.h for host platform, type=list, default="", group=pico_base
|
||||
add_header_content_from_var(PICO_${PICO_PLATFORM_UPPER}_CONFIG_HEADER_FILES)
|
||||
|
||||
file(GENERATE
|
||||
@ -26,4 +26,4 @@ configure_file( ${CMAKE_CURRENT_LIST_DIR}/include/pico/version.h.in ${CMAKE_BINA
|
||||
|
||||
foreach(DIR IN LISTS PICO_INCLUDE_DIRS)
|
||||
target_include_directories(pico_base_headers INTERFACE ${DIR})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
@ -49,11 +49,11 @@ endfunction()
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(rp2_common)
|
||||
|
||||
# PICO_CMAKE_CONFIG: PICO_NO_HARDWARE, OPTION: Whether the build is not targeting an RP2040 device, type=bool, default=1 for PICO_PLATFORM=host 0 otherwise, group=build
|
||||
# PICO_BUILD_DEFINE: PICO_NO_HARDWARE, Whether the build is not targeting an RP2040 device, type=bool, default=1 for PICO_PLATFORM=host 0 otherwise, group=build
|
||||
# PICO_CMAKE_CONFIG: PICO_NO_HARDWARE, OPTION: Whether the build is not targeting an RP2040 device, type=bool, default=1 when PICO_PLATFORM is host, 0 otherwise, group=build
|
||||
# PICO_BUILD_DEFINE: PICO_NO_HARDWARE, Whether the build is not targeting an RP2040 device, type=bool, default=1 when PICO_PLATFORM is host, 0 otherwise, group=build
|
||||
set(PICO_NO_HARDWARE "0" CACHE INTERNAL "")
|
||||
# PICO_CMAKE_CONFIG: PICO_ON_DEVICE, OPTION: Whether the build is targeting an RP2040 device, type=bool, default=0 for PICO_PLATFORM=host 1 otherwise, group=build
|
||||
# PICO_BUILD_DEFIN: PICO_ON_DEVICE, Whether the build is targeting an RP2040 device, type=bool, default=0 for PICO_PLATFORM=host 1 otherwise, group=build
|
||||
# PICO_CMAKE_CONFIG: PICO_ON_DEVICE, OPTION: Whether the build is targeting an RP2040 device, type=bool, default=0 when PICO_PLATFORM is host, 1 otherwise, group=build
|
||||
# PICO_BUILD_DEFINE: PICO_ON_DEVICE, Whether the build is targeting an RP2040 device, type=bool, default=0 when PICO_PLATFORM is host, 1 otherwise, group=build
|
||||
set(PICO_ON_DEVICE "1" CACHE INTERNAL "")
|
||||
|
||||
set(CMAKE_EXECUTABLE_SUFFIX .elf PARENT_SCOPE)
|
||||
|
@ -62,7 +62,7 @@ if (NOT TARGET pico_standard_link)
|
||||
# PICO_BUILD_DEFINE: PICO_NO_FLASH, whether this is a 'no_flash' build, type=bool, default=0, but dependent on CMake options, group=pico_standard_link
|
||||
target_compile_definitions(pico_standard_link INTERFACE PICO_NO_FLASH=$<IF:$<STREQUAL:$<TARGET_PROPERTY:PICO_TARGET_BINARY_TYPE>,no_flash>,1,$<AND:$<BOOL:${PICO_NO_FLASH}>,$<STREQUAL:,$<TARGET_PROPERTY:PICO_TARGET_BINARY_TYPE>>>>)
|
||||
# PICO_USE_BLOCKED_RAM will be set based on PICO_TARGET_BUILD_TYPE target property being equal to use_blocked_ram if set, otherwise to the value of the PICO_USE_BLOCKED_RAM cmake variable unless PICO_TARGET_TYPE is set to something else
|
||||
# PICO_BUILD_DEFINE: PICO_USE_BLOCKS_RAM, whether this is a 'blocked_ram' build, type=bool, default=0, but dependent on CMake options, group=pico_standard_link
|
||||
# PICO_BUILD_DEFINE: PICO_USE_BLOCKED_RAM, whether this is a 'blocked_ram' build, type=bool, default=0, but dependent on CMake options, group=pico_standard_link
|
||||
target_compile_definitions(pico_standard_link INTERFACE PICO_USE_BLOCKED_RAM=$<IF:$<STREQUAL:$<TARGET_PROPERTY:PICO_TARGET_BINARY_TYPE>,use_blocked_ram>,1,$<AND:$<BOOL:${PICO_USE_BLOCKED_RAM}>,$<STREQUAL:,$<TARGET_PROPERTY:PICO_TARGET_BINARY_TYPE>>>>)
|
||||
# PICO_COPY_TO_RAM will be set based on PICO_TARGET_BUILD_TYPE target property being equal to copy_to_ram if set, otherwise to the value of the PICO_COPY_TO_RAM cmake variable unless PICO_TARGET_TYPE is set to something else
|
||||
# PICO_BUILD_DEFINE: PICO_COPY_TO_RAM, whether this is a 'copy_to_ram' build, type=bool, default=0, but dependent on CMake options, group=pico_standard_link
|
||||
@ -89,7 +89,7 @@ if (NOT TARGET pico_standard_link)
|
||||
# this line occasionally useful for debugging ... todo maybe make a PICO_ var
|
||||
# target_compile_options(pico_standard_link INTERFACE --save-temps) #debugging only
|
||||
|
||||
# PICO_CMAKE_CONFIG: PICO_NO_GC_SECTIONS, Disable -ffunction-sections -fdata-sections, and --gc-sections, type=bool, default=0, advanced=true, group=pico_standard_link
|
||||
# PICO_CMAKE_CONFIG: PICO_NO_GC_SECTIONS, Disable -ffunction-sections -fdata-sections and --gc-sections, type=bool, default=0, advanced=true, group=pico_standard_link
|
||||
if (NOT PICO_NO_GC_SECTIONS)
|
||||
target_compile_options(pico_standard_link INTERFACE -ffunction-sections -fdata-sections)
|
||||
target_link_options(pico_standard_link INTERFACE "LINKER:--gc-sections")
|
||||
|
@ -2,8 +2,8 @@
|
||||
option(PICO_STDIO_UART "Globablly enable stdio UART" 1)
|
||||
# PICO_CMAKE_CONFIG: PICO_STDIO_USB, OPTION: Globally enable stdio USB, default=0, group=pico_stdlib
|
||||
option(PICO_STDIO_USB "Globablly enable stdio USB" 0)
|
||||
# PICO_CMAKE_CONFIG: PICO_STDIO_USB, OPTIONS: Globally enable stdio semihosting, default=0, group=pico_stdlib
|
||||
option(PICO_STDIO_USB "Globablly enable stdio semihosting " 0)
|
||||
# PICO_CMAKE_CONFIG: PICO_STDIO_SEMIHOSTING, OPTION: Globally enable stdio semihosting, default=0, group=pico_stdlib
|
||||
option(PICO_STDIO_SEMIHOSTING "Globablly enable stdio semihosting" 0)
|
||||
|
||||
if (NOT TARGET pico_stdlib)
|
||||
pico_add_impl_library(pico_stdlib)
|
||||
|
Reference in New Issue
Block a user