Skip to content

Commit e19f9d9

Browse files
committed
Updated CMakeLists for test program.
1 parent d174f0e commit e19f9d9

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

test_program/CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
# Set minimum required version of CMake
2020
cmake_minimum_required(VERSION 3.12)
2121

22+
# Set Pico Board and Pico Platform
23+
set(PICO_PLATFORM rp2350-arm-s)
24+
set(PICO_BOARD pico2)
25+
2226
# Include build functions from the Pico SDK
2327
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
2428

2529
# Set project name and C/C++ standards
26-
project(Blink VERSION 0.1.0 LANGUAGES C CXX ASM)
30+
string(TIMESTAMP DATEVER "%Y.%m.%d" UTC)
31+
project(Blink VERSION ${DATEVER} LANGUAGES C ASM)
2732
set(CMAKE_C_STANDARD 11)
28-
set(CMAKE_CXX_STANDARD 17)
29-
30-
# Set Pico Board and Pico Platform
31-
set(PICO_PLATFORM rp2350-arm-s)
32-
set(PICO_BOARD pico2)
3333

3434
# Initialize the Pico SDK
3535
pico_sdk_init()
@@ -49,5 +49,4 @@ pico_set_program_version(${PROJECT_NAME} ${PROJECT_VERSION})
4949
pico_set_program_description(${PROJECT_NAME} "Pico Build Action - Simple blink test program")
5050

5151
# CMake flags
52-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
53-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections")
52+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")

0 commit comments

Comments
 (0)