cmake cleanup
This commit is contained in:
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
# use directory name for project id
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
|
# use BOARD-Directory name for project id
|
||||||
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||||
set(PROJECT ${BOARD}-${PROJECT})
|
set(PROJECT ${BOARD}-${PROJECT})
|
||||||
|
|
||||||
@@ -38,5 +40,5 @@ elseif(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -7,18 +7,13 @@ set(TOP "../../..")
|
|||||||
get_filename_component(TOP "${TOP}" REALPATH)
|
get_filename_component(TOP "${TOP}" REALPATH)
|
||||||
|
|
||||||
# Check for -DFAMILY=
|
# Check for -DFAMILY=
|
||||||
if(FAMILY MATCHES "^(esp32s[2-3])*")
|
if(FAMILY STREQUAL "rp2040")
|
||||||
cmake_minimum_required(VERSION 3.5)
|
|
||||||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
|
|
||||||
project(${PROJECT})
|
|
||||||
|
|
||||||
elseif(FAMILY STREQUAL "rp2040")
|
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
|
||||||
include(${TOP}/hw/bsp/${FAMILY}/pico_sdk_import.cmake)
|
include(${TOP}/hw/bsp/${FAMILY}/pico_sdk_import.cmake)
|
||||||
project(${PROJECT})
|
project(${PROJECT})
|
||||||
add_executable(${PROJECT})
|
add_executable(${PROJECT})
|
||||||
|
|
||||||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
|
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
|
||||||
|
|
||||||
# Example source
|
# Example source
|
||||||
@@ -39,5 +34,5 @@ elseif(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -10,6 +10,8 @@ get_filename_component(TOP "${TOP}" REALPATH)
|
|||||||
|
|
||||||
# Check for -DFAMILY=
|
# Check for -DFAMILY=
|
||||||
if(FAMILY MATCHES "^esp32s[2-3]")
|
if(FAMILY MATCHES "^esp32s[2-3]")
|
||||||
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
|
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
|
||||||
project(${PROJECT})
|
project(${PROJECT})
|
||||||
|
|
||||||
|
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -34,5 +34,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -34,5 +34,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -80,5 +80,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -34,5 +34,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
|
|||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user